The two mains are located outside, presumedly side by side. Firemen should notice both, and shut off power, then extinguish the fire.
Feeders after the main could run anywhere through the interior. If fire walls are penetrated, then they must be sealed and/or repaired, according to building code (as always).
Does common sense indicate we should maybe run building two's feeder outside the building? Maybe.
Do economic concerns indicate we should run SER, and keep it as short as we can (running through building one)? Maybe.
Either choice meets code.
Building code and the NEC define a building as a structure standing alone or separated by fire walls (not merely fire rated assemblies). Do not confuse the two.
Fire rated assemblies are not necessarily structural (but could be) and can include walls, ceilings, floors, and even roofs. they are intended to delay the spread of fire for a period of time to allow folks to exit the building safely, and the fire folks to extinguish the flames.
Fire walls are special fire rated assemblies that also will structurally support the building on either side of the wall even when there is a fire on the opposite side of the fire wall. An example is a masonry or concrete wall of appropriate thickness, with staggered nitches for the insertion of the beams and girders that hold the floors, ceilings and roof structure elements. If a fire should burn a girder completely through, the girder would fall into the inferno (due to special "fire cut" ends), but the fire wall would remain standing, and the building beyond would remain structurally sound.
Fire walls separate a single structure into buildings. Fire assemblies separate a building into fire or smoke areas.