After reading "Building the 747", it was surprising to find out that the sweepback of the 747 was a compromise. Designers wanted the plane to go faster than the 707 which had a sweepback of 35 degrees, so 40 degrees was picked. However the engineering for a 40 degree sweep was too complex so they settled at half way 37.5 degrees.
Since then, I imagine there's somewhat more theory behind the degree of sweep.