Superman was given flight as a logical extension of his original ability to leap tall buildings... But they are not the same ability. While he isn't immune to gravity, he's obviously capable of exerting force on his body without using his physical strength. IIRC, it's explained as some sort of limited telekinesis. At one point, he even mentions at that things seem lighter when he's flying.