SpaceX manufactures their booster in Hawthorne, CA. They then truck it on the highways to McGregor, TX for test firing with all 9 engines.
Then it is back on a truck for the drive to Florida to LC-40 at the Air Force station for launch.
The diameter of the booster at 12 feet/3.6 meters is the largest they could go and still be road transportable.
Delta IV in comparison is built in Decatur, AL and shipped by barge to the Cape or Vandenberg for launch as it is too wide.
The original Falcon 9, the 1.0 version was the appropriate size for its width in order to have enough fuel and oxidizer for a mission to orbit based on how long the Merlin-1C engines needed to fire for that mission.
The 1.1 version changed the engine to the Merlin-1D a higher thrust engine, which means it also consumed more fuel and oxidizer so the tanks had to get bigger to hold the extra propellant. They could not go wider, and stay road transportable so they went longer.
The legs are transported separate, and attached at the launch site as they make it just too tall to transport.
Amusingly it is height, not width that is the limiting factor. But for a round stage that distinction is without a difference.