From the industrial revolution until after World War II, it was common to build factories in multiple stories. It started because power, whether from a water wheel or a steam engine, came from a single source and drove machinery by belts, which were shorter when they went vertical. It wasn't until the small electric motor was developed that it became economical to go horizontal.
Then there was the issue was getting the workers to the job; they usually walked and therefore had to be pretty close. Streetcars were common in the first half of the twentieth century, running from residential areas to the factories. By the 1950s, the multistorey factory was just about extinct, killed by the single floor factory in the suburbs and serviced by the car.
In 1928 FIAT opened its Lingotto Factory in Turin, Italy; it was the largest in the world. parts would enter the building at the bottom, delivered from the adjacent rail lines, and cars would exit at the top. The whole roof was a test track; then the cars would whizz down the ramp and out of the building. Tom Joslin described it in Jalopnik:
When a Fiat had finished its climb through the 16,000,000 square feet of Lingotto it exited the building by way of the roof. Each Fiat was taken on to the roof and around the banked race track to make sure the prior five floors of manufacturing had done their jobs to satisfaction. If the car was satisfactory, it would return down to ground level through one of the two spiral access ramps at either end of the test track.
Designed by engineer Giacomo Mattè-Trucco, the Lingotto factory was one of the first buildings of its size to rely heavily on reinforced concrete in the construction process.... The test track's banked turns were constructed from an intricate series of concrete ribs in a construction technique that had not been used frequently before Lingotto's construction. It is safe to say the technique had never been used for a test track 6 stories in the air.
Today the building is a big shopping mall and theater complex, with FIAT's head office (at least for now) next store in a lovely restored building. Cars are probably not the kind of product that lends itself to vertical manufacture, But I wonder if vertical factories, like vertical farms, might not be the next big thing, bringing jobs close to the workers again.