The way you phrase that, it sounds like you're saying there could be a machine that operates due to permanent magnets, but depletes them as it runs, so that eventually they're not magnetic anymore. That's an interesting proposition.. Is there any reason a machine like that could or couldn't exist?
As far as I am aware, the field of a permanent magnet is down to the alignment of the electron spins, the more aligned they are, the further out the field reaches instead of the flux lines being closely folded up and canceling out. However there is not a difference in energy for different alignments, so you cannot get work out from reducing the extent of the field.
edit - think about the difference between having one big wave or millions of small ones that add up to the same energy as the big one. There is no energy difference between the two systems, but if you are standing on a cliff overlooking the sea, only the big one is going to get you wet.
I have heard of them and I know at least three people who have tried to build them. I have never seen one work and I know of nobody who says they have seen one work in person.
edit - also, I went and had a bit more of a look and it turns out there is an energy difference between magnetised and demagnetised materials, but it is very small. One thing is that spontaneous magnetization happens and it wouldn't occur if the energy difference was large.
There are. They're called "Magnet Motors". You see a lot of them in 'free energy' and 'perpetual motion device' circles. They're not useful because you can't get much energy out and, as I said, the magnets stop being magnets. People most often don't understand the second bit which is why they think they've cracked humanity's energy problems.
My intuition is that magnets are in a lower energy state than non-magnets, because I would imagine it takes energy to unaligned magnetically aligned molecules.