Why does a perpetual motion machine of the first kind violate the law of conservation of energy?
It requires the creation of energy to operate.
A perpetual motion machine of the first kind produces work without the input of energy. So the output is larger than the input. That is not possible unless energy is created. The principle of conservation of energy states that energy cannot be created or destroyed (only transformed from one type to another).
You may see various videos on the internet claiming to show a perpetual energy machine in operation. Those are in fact false claims. If the videos continued you would see the machine slow down and stop. That is due to the friction acting on the system. Moreover, if the machine was set to drive some load – such as lifting a mass – then the machine would stop sooner or even immediately.