This question already has an answer here:
We know that magnetic does not do any physical work . Now consider; we attached a magnet in a wall with help of a tape. Now we bring a magnet near to other magnet and released we see that magnet will displace towards other magnet. How was the work done on the second magnet to traverse the distance ?