If you go on a safari you can see this phenomenon in parts of Africa. It’s not entirely clear why lions climb trees. It could be to avoid the pesky biting insects. But it could also be to ensure other predators such as hyenas don’t bother them. It’s interesting, though, that not all lions do this.
They only seem to do this in certain parts of Africa, such as the Serengeti National Park, Tarangire National Park and Lake Manyara National Park (all in Tanzania), and also in Queen Elizabeth National Park (Uganda). The safari guides make sure to always check the trees for lions here too, not just for leopards, who also like to hang out in trees.