Because no energy is being created or destroyed. If you attempted to do any work with this system, to get any energy out of it, then it would indeed lose kinetic energy and be fully compliant with the First Law of Thermodynamics.
It is a misconception that the First Law disallows perpetual motion. What it disallows being able to extract energy or work from a system perpetually. It is perfectly acceptable for a self-contained system to be in perpetual motion, but you will be unable to actually extract anything from it (and it remain perpetual).
Latest Answers