As far as TV is concerned, shows end on the :00 and :30 because it is advantageous to the networks to try to get as much traffic as possible. If a network had a show that was 45 minutes long, so they started at 9:15, they'll lose viewership because people will have switched on a show that starts at 9:00 and become engrossed in the plot. Without ratings there is no ad revenue, so networks want to keep viewership as high as possible. To do this, you need to capture channel-surfing traffic, which is always highest when other networks' shows are ending, ergo all TV networks tend to follow roughly the same schedule.
With music, yes, it started over a hundred years ago with the advent of records, but there's obvious examples of longer songs have trimmed down radio edits. From a radio station's standpoint, the shorter a song is, the better off you are. People will listen to something they like regardless of length, but they don't want to sit through 5 minutes of something they hate. If all the songs are relatively short, the odds are greater that people won't change the channel if a song comes on they dislike because it will be over soon enough. Again, more listeners equates to more ad revenue, so you don't want people changing the station. I'm sure there's probably research that shows that 3 to 3:30 minutes is the ideal length for a song based on how people react to it; long enough that you can get into it, short enough that you don't get bored. A song like Blur's Song 2 is great to rock out to, but at 2 minutes flat, it feels like it's over before it began. If it were 4 minutes, it would probably feel forced. Pop is all about striking a balance to reach the broadest audience at the lowest common denominator (and in the end, produce nothing of value).
A movie's length is far more fluid than TV or music (on the radio). People can't change channels in a theater, so you don't have to worry as much about attention span and keeping the audience entertained. Generally, anything less than an hour is taboo, considered a ripoff, and is often mentioned in reviews. Anything above three hours is ridiculous unless you're telling a particularly long tale (a la Lord of the Rings). 90 minutes is fairly standard for comedies, as the plot is generally only there to facilitate jokes, and audiences can only laugh for so long before becoming exhausted. Action films are roughly the same way, with more of a focus on watching things explode. Dramas tend to be longer, often 2 to 2 and a half hours or more, because there is a focus on delving in to a deep plot which may not be sufficiently explained in a shorter run time. Animated features generally have the shortest run times because they require vast amounts of work (drawing or rendering every individual frame), which gets very time consuming; it helps that they are primarily intended for children, who have a shorter attention span than adults. But nothing is set in stone; True Lies clocked in at 2 and a half hours, incredibly long for an action/comedy, and Pearl harbor ran to 3 hours (though most critics decried the length of the film as extremely off-putting).
In the end, it all comes down to men in suits sitting around a desk thinking how they can convert music and film recordings into money. Formulas are established, artistic expression is forsaken to the whim of the almighty dollar, and you end up with
cookie cutter artists recycling the same old garbage ad nauseum.