It is not the responsibility of the rest of society to pay you a handsome salary for a programming hobby. If your code isn't generating enough value that someone wants to pay for it, it's about as useful as model trains.
Having said that, "value" doesn't have to be measured in euros. I personally work in a semi-governmental institution, and the main focus of my team is reducing the amount of cybercrime in my country. I still need to provide that value to earn good money, but I enjoy that more than working to make investors rich (there's nothing wrong with that though, and it usually pays better).
[1] anecdotal, among my social groups, I don't really have hard data about this.