Thermocouples do this. But are so inefficient that the power produced can only be used to sense temperature, and even then it takes a lot of amplification and signal processing circuitry.
The only power-producing application I know of that what is called a radioisotope thermal generator (RTG). They surround a block of radioactive material that produces heat as it decays with thermocouples. They use this to power deep space probes like Voyager 1 and 2. No moving parts. Long lasting and very reliable, but very very inefficient. The only other application I know of is the USSR powering lighthouses with them.
Oh yeah. Efficiency increases as temperature gradient increases so with the already bad efficiency of thermocouples, you need to run the thing much hotter than the surroundings to recoup any efficiency you can.
It's a bit like asking why we don;t use geothermal energy everywhere. It's just not feasible or practical in most cases.