The original reason for focusing on the field generated by a stationary magnet was to simplify the issue since a moving magnet generates an electric field. Also it takes work to move a magnet, so it is logical that the work would be a source of energy that enables the magnet to exert force.


Although a stationary magnet cannot affect a stationary charge, it can affect another magnet or ferromagnetic material which is not moving relative to the first magnet. At first glance this seems much simpler since there are no moving charges and no moving magnets.  However the electrons in a magnet do move. This movement of the electrons represents moving charges and therefore generates a magnetic field.

 
Initially, the way a magnet can move other objects seems to violate the law of conservation of energy; work is apparently being accomplished without the expenditure of energy. However, when a magnet, through its magnetic field, displaces a moving charged particle, no work is done because the force is perpendicular to the displacement of the particle (work equals force over the distance the force acts).

 A magnet cannot change the kinetic energy of a charged particle; only the particle's direction changes (Serway and Jewett  2004). Therefore, a magnet cannot act upon a charged particle that is at rest relative to the magnet since that would change the particle's kinetic energy.

When two magnets have the proper orientation, one magnet can be used to push the other magnet. However, no work is done (at least by the magnet), because work must be done to push the first magnet and that work is transferred through the magnetic field of both magnets in order to exert a force on the second magnet.

When one magnet pulls another magnet the energy comes from the energy stored in both magnets' magnetic fields. How does that energy end up in the magnetic fields in the first place? If two magnets are together initially, it will take a force to separate them. It seems logical that force could be stored in the fields. If a magnet is constructed separate from any other magnet, the energy must come from the energy expended during construction.