In electromagnetic simulations, all waves only exist in a small simulation box, so you need to do something when they reach the edge, this is the physical intuition of boundary condition in PDE. For E&M, people use a funny trick called the Perfectly Matched Layer. Instead of a real mathematical boundary condition, PML behaves more like a model of an anomalous material with strange nonphysical properties that magically absorbs all the E&M waves perfectly. Someone needs to write some SCP fiction about how The Factory made PML...