I suggest you read both the 1968 Integrated Manned Program Plan in which the shuttle was initially proposed, and "The Space Shuttle Decision" by T.A. Heppenheimer.
Well good for that book, but that doesn't change the fact that when the Space council, which would have been chaired then by Spiro Agnew, recommended to the President that the United States pursue 3 different objectives. A new launch vehicle for LEO, for which they picked the Space Shuttle proposal which was kicked about a few years prior, LEO infrastructure, that being a Space Station primarily, and a manned mission to Mars.
Nixon said no to Mars, greenlighted the station and the Shuttle.
NASA then got its budget axed, it became rapidly apparent that they could not afford to pursue both a station and the Shuttle at the same time, so they needed to pick one to develop first, and they choose the Shuttle. It was only after this that the Air Force got involved with their requirements for the larger cross range, the polar flight capability, the large payload bay. But none of this changes the fact the Shuttle's primary purpose when envisioned was for the construction and support of a LEO space station.
It was then moved to that it would assist with Skylab....that too didn't come to fruition.
So this idea that the Shuttle building a space station as some sort of, after thought, and a plan in which the Shuttle had no business doing is flat out not true.