In many countries, there is a legal requirement for houses to be grid-wired. Also, in some cases autoproduction of energy might or might not be elegible for tax.