Many times I have been told by the tower Cleared for takeoff, immediate right turn to (compass heading in degrees). The tower wants me off the runway heading to facilitate traffic or weather separation.
As a passenger in an airliner taking off to the south from Tampa. As soon as the wheels were off the ground we were in a right turn to parallel a causeway across the bay. The heading change was about 90 degrees right. There was a storm cell about a mile south of the departure end of the runway that we just left. I wouldn’t have wanted to fly through it either.
Source: Quora