Why is the standard length of a song usually around 3 minutes?

I know it’s on a case by case basis, but the track length of most modern music is usually around 3-3.5 minutes.

Is it just because it’s more marketable that way?