The Laws of Thermodynamics are the Laws of "Heat Power." Magnetism and electricity are not heat processes. A magnet can create force from nothing.
Herp derp.
Heat is a model to describe the flux of thermal energy a combination of kinetic and internal potential energy, which quite literally comes from the energy state of the electrons, which when unpaired, produce magnetic field and produce a current when allowed to move freely in a conductor, also known as electricity.