Yahoo's survival is a legacy of it's huge success in the late 1990s when it was the most successful company on the Internet. You are likely young and did not experience Yahoo's almost Google like dominance at the time.
First, while Yahoo's core "portal" business model was losing market share to search (i.e. Google) the overall market for online advertising was growing rapidly which masked it's weakness for many years.
Second, it invested it's huge early profits into the growing Internet both in the US and internationally. Most of these investments were failures but two were HUGE successes: Alibaba and Yahoo Japan.
Yes, Yahoo is a declining platform but still has millions of users for all of the things you list. Like it predecessor AOL there is a very long tail as people are creatures of habit and don't like to change email or start page, etc.