I used to write business apps for a law firm, when I wrote a VB program with Crystal Reports to do a series of reports, the people who used to do the reports by hand got fired and lost their jobs. I felt bad about that as well. Some of them did reports in MS-Office using Excel or Word or did it on paper before that.
I changed paper forms into electric forms stored in a database. The people who used to handle and process those forms got fired as well.
Robots now are ready to replace cheap labor, they can cook food or do other things as well.
We really need a Basic Income for people who lost their jobs due to automation, and almost everything we invent in software puts people out of work. If they don't learn new skills for new jobs, they could become unemployed.
Edit: Sources: https://public.tableau.com/profile/mckinsey.analytics#!/vizh...
http://singularityhub.com/2015/11/19/automation-is-eating-jo...
http://www.zerohedge.com/news/2015-11-09/automation-doesnt-j...
http://www.industryweek.com/automation/future-automation-and...