Sweet: allows us to identify carbs such as sugars - key energy source.
Sour: identify gone-off food which may be harmful.
Salt: all cells need salt to function so it's important to be able to identify it.
Bitter: associated with poisonous plant chemicals - helps us to avoid them
Umami: (recently discovered) meaty or savoury, indicates a source of protein.
Humans evolved to eat meat just after splitting from the ape-line 6 million years ago. It's a rich source of protein so allowed for the development of a larger brain = human success.