I think Ali's head had been so inflated with the legend of himself that he truly thought that he would beat Holmes. Self confidence is one thing but that was self delusion let's be honest. He should have retired and become a talk show host, he'd have made more with his mouth than with his fists.
Ego,money and a lot of his entourage,sensing the gravy train was going to kick them off at the next station,pressurising him to come back one more time. I also believe that the ease which Muhammad beat Leon Spinks in their second fight,two years prior to meeting Holmes,gave him a false sense of security. He'd forgotten that Spinks was n't as good as he was in their first bout. Maybe.....just maybe,if Leon was the same as he was in fight number one,and Ali had to put in more of an effort to beat him he would n't have come back for the Holmes fight. Not counting on it though.
Before Holmes he had announced to retire. Then he changed idea. Probably his ego pushed him to continue.
When you prove people wrong and wrong time and time again. You're going to have a large ego. Problem was he wasn't even the fighter that he was in the Spinks fights. He had declined that badly.