A few years ago I programmed an 8 bit MCU that, with a few external components, controlled power for a much larger embedded system. I think the device cost about 17 cents, and it was cheaper than dedicated power control circuitry.
It was a fun little project; getting away from massive builds of console software and just sitting down for a couple of weeks and banging out some high reliability and very low footprint code was a refreshing change of pace.
It's funny that this little chip was still more capable (by several times) than the first computer I owned, back in the late 70s.
In the 80s my roommate and I used to joke that one day computers would be prizes in cereal boxes, just toys that would fall out. Those days have almost certainly arrived.
These things are so darned cheap that I can't see them going away.