The launch pads have been there since Apollo. The Shuttle has to be positioned correctly over the flame trenches on the pad, so this is what dictates orientation before launch.
The shuttle rolls once clear of the pad to head generally east, and then more specifically to a heading for the required orbit (in relation to the equator).
The roll allows for better comms with the ground, makes some emergency manoeuvres easier, gives the pilots a better view(!), and creates a slight negative angle of attack that protects the whole structure and the wings from overloading.
That's how I understand it anyway.