At a certain point, employing humans will become pointless. Robots will be able to do everything a person can for cheaper. This will divide people into two camps: those who own enough shares of robot companies to live off of dividends, and those who don't. The latter will be destitute, and also by far the largest camp. You will have an army of millions of smart, capable, very angry, and very hungry people. They will go into revolt, unless you give them some solution. That is why you will do UBI.