[Relevant xkcd](https://xkcd.com/927/)
Sometimes they serve different purposes. For example GIF and PNG are lossless formats so they are meant for graphics, while JPEG is a lossy format so it’s better for things like photographs. Sometimes they’re just advanced versions of previous formats, for example PNG is the successor of GIF, with better compression and quality. Sometimes they are just competing formats developed by different companies.
Latest Answers