Electromagnetic field in a box vs. boundary conditions I understand that a commonly applied step (see Wikipedia for an example) in quantizing the electromagnetic field is "enclosing the field in a cubic box" and later taking a limit of that box to infinity. This allows working in a discrete countable basis of eigenvectors of momentum, finite energy per mode, number states, etc., and is used to to derive partial results an easier way than in a full-blown continuous field theory, assuming that one can defer taking the limit to generalizing these.
I'm confused by this step. It's said that in the "box", the wave vectors can only take particular discrete values. However, this would be a result of boundary conditions. (A box without boundary conditions is just an imaginary window into the entire space and doesn't pose any other restrictions than the the latter would.) It's important to specify properly what these are, which is what all the sources I've seen so far neglect silently.
If the walls of the box were, for example, reflective, this would be a major problem because this does not permit running waves at all. They always come in linear combinations resulting in a standing wave. Mathematically, their amplitudes are not independent and the canonical commutator wouldn't be true.
It seems to me that what is indeed assumed are periodic boundary conditions. This would mean the system is not enclosed in a box, but rather lives in a 3-torus! Such "box" couldn't even be constructed in our space! What's the motivation to consider something so unphysical for a model and expect the results to generalize correctly? Or, if this is not the case, what am I missing?
 A: Similar questions have been asked on this site in different scenarios, the closest match asking about phonons.
In the accepted answer there, it is argued that

In the [linear size of the system L to infinity], boundary conditions don't really matter, and most physical observables will be the same for all boundary conditions.

Indeed, in a reformulation, there's no difference between $\mathbb{R}^3$ and a sufficiently large $T^3$ that we could distinguish using local measurement of limited reach in a limited time. So if we want to treat the former as a limit of some space of a finite volume, a torus (or, assuming periodic boundary conditions) is the most advantageous choice as we get planar waves with linearly independent (in Coulomb gauge) amplitudes that naturally generalize to continuous-$\vec k$ planar waves for the same reason Fourier series has Fourier transform for its limit.
Expanding on another important fact from the linked answer,

[T]ranslation symmetry is conserved, which really helps. One could in principle do the calculation with other boundary conditions, [...] but this usually makes the calculation more painful that it has to be.

One could, theoretically, work with a box with reflective surfaces, as the OP suggests for alternative. This has solutions in the form of standing waves, but linear combinations thereof resemble wave packets traversing the box and bouncing off its surfaces. As the size of the box grows, it allows for broader wave packets with a tighter spectrum. Plane waves emerge in the weak limit as generalized eigenstates of energy and momentum, having infinite spread in position space and zero in momentum space, and taking infinitely long to pass each point.
A: A standing wave in a reflective box is a possible mode (two runnig in the opoosite direction waves), but if there is a charge inside, it may "pupm" a propagating wave due to exciting the amplitudes of runnig waves differently (give them differnet amplitudes).
