It is more efficient. I thought it’s obvious, that’s why web sites use it, to save traffic and potentially storage. Hence my comparison to video formats. You don’t see YouTube playing videos in Real Media format.
It’s also more universal, combining features of jpg, png and gif. Gif especially is a dreadful format for what it’s commonly used. It was designed for tiny clipart animations, not HD video clips. Something like x265 can actually be hundreds of times more efficient.