Why are 737 fuselages built in Kansas?
The Boeing 737 fuselage (among other components) in Wichita for a variety of reasons


Before Boeing sold the Wichita portion of the Boeing Commercial Airplanes business to the Onex Corporation in 2005, Boeing was manufacturing structures for their aircraft in Wichita. The engineering, manufacturing, supply chain, and storage resources already existed in Wichita, so it wouldn't make sense to try to move all of that back in house at another location.
The cost to transport large components from Wichita to Renton or Everett via train is likely more economical than to manufacture and store them at the final assembly plant


On a similar vein, Boeing also uses the modified 747 Dreamlifter to transport components between suppliers and Boeing. Wichita is one of the cities that the Dreamlifter flies into, landing at McConnell Air Force Base.