Koalas are huge fan of sleeping and this is the core reason that Koalas sleep more than 20 hours a day. It also means that if a Koala sleeps 20 hours a day, then it have only 4 active hours during which it has to do other activities which might primarily be eating eucalyptus leaves, seeking and maintaining its territory and finally look for potential mates (for males). Koalas are slower and sluggish movers and they do not do such things in a brisk manner. They eat slowly and also they move slowly as well.
Other herbivores typically the antelopes do not sleep at all. Probably they sleep 5 minutes only within their 24 hours. Now this is far less than the sleeping of the Koalas. On the other hand among the carnivores, lions sleep around 20 hours a day but yet they are quick hunters and penetrate very fast. Koalas do not exhibit such traits, they are powerless, they are defenseless and yet they sleep more than 20 hours a day.
But why Koala would be requiring such a huge sleep when it could not fulfill its food requirements (its food does not offer any good nourishment). In such a scenario a Koala will have to conserve its energy. They slow down their metabolism. Metabolism rate could only be slowed down when an organism is slow to penetrate around its environment. Therefore, in order to slow down their metabolism, they prefer sleeping. More sleeping means slower metabolism for longer period of time and maintain their energy levels. And this allows Koalas to sleep for maximum period of time that is 20 hours a day or more.