Launching from Florida 28.5 degree inclination to rendezvous with ISS at 400km to 51 degree inclination of ISS
The latitude of a launch site determines the minimum inclination that can be directly reached; launching from 28.5º latitude in the due-East direction achieves a 28.5º orbital inclination. Launching to any higher inclination is straightforward, simply by steering continuously North-of-East during the ascent. In the extreme case, if you fly due North, you enter a near-polar orbit (the rotation velocity you receive from Earth before you leave skews things a bit).
In the case of the space shuttle:
These two images show that the flame trenches at KSC point due south, and that the Orbiter's tail when installed on the pad also points due south.
(source: Google Maps)
Therefore if the shuttle launched and went into a gravity turn in the desired heads-down attitude without rolling at all, it would have flown due south.
As explained in this answer, a launcher gains the maximum benefit from the Earth's rotational speed if it launches due east. This will place the vehicle into an orbit with an inclination equal to the launch site's latitude - in the case of Kennedy Space Center, 28.5º.
To fly due east and obtain this benefit while maintaining the desired heads-down attitude, it is clear that the shuttle had to roll 90º since it was mounted on the launch pad with the tail pointing south.
However, with the inclusion of Russia in the International Space Station (ISS) project, an orbit inclined 51.6º was chosen to allow the use of Russian launch sites.
For the shuttle to reach this 51.6º inclination, it had to roll even further north to align with this flight azimuth. Therefore, the vehicle performs a single axis rotation (SAR) maneuver, often called the "roll program", after clearing the launch pad, to align its direction of flight with the desired azimuth. This SAR both aligns the flight path with the desired azimuth, turns the vehicle heads-down, and starts the gravity turn.
To minimize the amount of delta-v required to change orbital planes, the launch time for an Shuttle mission to the ISS was set, if possible, to the time at which the ISS orbit passed over the launch site. However, choosing this launch time did not preclude the necessity of rolling to the proper azimuth. If the shuttle had launched at the exact time of ISS orbital plane passage with the desired heads-down attitude and not rolled, it would have flown due south.
In this video taken from a camera on the right-hand Solid Rocket Booster of STS-127, you can clearly see the vehicle roll from tail-south to tail-east. In the video, liftoff occurs at ~0:50 seconds, the roll starts at ~1:00, and at ~1:17 you can clearly see the coastline under the tail.