This is no magic trick. Thanks to the Federal Reserve’s inflationary policies, many coins are now worth more as bullion than their face value.
A pre-1982 copper penny is worth three cents.. Post 1982 pennies are made from plated zinc and only worth a small fraction of their face value. A nickel is worth seven cents. Expect to see this replaced with a cheaper metal soon. The mint can’t afford to make them from copper and nickel at these prices.
Gresham’s Law says that bad money drives out the good. What this means is that coins with a face value lower than price of the metal in them will be removed from circulation as people save them. There’s a reason you no longer see silver coins in circulation even though they’re still legal tender. When a silver dime is worth over two dollars it’s silly to spend it for ten cents.