The extreme example, of course, being satellites, this being why solar panels have always been used on them, even with impractical payback times.
A friend of mine (whom I haven’t seen in years) did exactly this. He bought a piece of land at the end of a long unpopulated dirt road. The power company said they would run lines for $10k. He took that amount of money and instead built a solar/wind setup, and has been living happily ever since, for far cheaper in maintenance than he would have paid for the power over the years had he spent that $10k on getting lines run to the grid.
About 15 years ago (the last time I saw him), other people had moved onto the road, and paid for the lines to be run. Power company said “we’ll hook you up, cheap”, he said “no thanks”.