How did the Panamera end up with the V8 when Porsche has a rich history of horizontally-opposed boxer engines? Testing. Lots of testing.
Flat 6 - Too much understeer.
Twin Flat 6 engines - Still too much understeer, not enough foot room.
In an attempt to eliminate some of the understeer, they developed a 8 cylinder boxer and got rid of the back seats. Fast, but still understeered.
Remembering all the successful front engined 12 cylinder cars of motorsports past, they tried that, but it never left the factory.
PIITB! someone said. Too much oversteer.
Remembering how much people liked air cooled engines, they tried the front layout again - this time transversely. Unfortunately, it ended up being an eight-passenger PanaPanameranameravan because nobody told them to make it into a V.
I think an engineer was fired for this.