Besides a photon is a plane wave that in a 1-Dimension model goes like this $ e^{i*(kx - wt)}$. So a photon is not localised but it is in a lot of places at once along the whole universe. SuchAt least until you do some measurement, you know. Quantum particles move like waves but when measured they are like marbles.
About this mathematics I would say that such a formulation is used for example when you want to get the spectrum of some model. For instance in quantum walk theory, in quantum optics