Why do electromagnetic waves become weaker with distance?
The weakening or otherwise of EM radiation is purely a matter of geometry.
If you have an isolated point charge the field lines travel radially outwards from the charge. At some distance $r$ from the charge the field lines are spread out over a sphere of area $4 \pi r^2$ so the field line density, i.e the field strength, is proportional to 1/$r^2$. Hence the inverse square law.
On the other hand, if you had a perfectly collimated laser its brightness would be unchanged no matter how far the beam travelled. A perfectly collimated laser is impossible for various reasons, but if you've been to any rock festival you'll know that lasers stay bright for a large distance (though they may be attenuated by the herbal smoke they travel through).
The EMW weakening is due to decreasing the photon flux, just like flux of particles decrease in vacuum after explosion. Kinetic energy of a given particle is the same, but the number of particles per square meter per second decreases with distance. Photons are still capable of exiting atoms at large distances - photon energy (frequency) does not change with distance.