It's all about packaging...
A mid engine with a longitudinal engine and transmission will have a very long rear. I recently borrowed an Elise friend's engine hoist to remove my Esprit engine... The Smaller hoist couldn't reach far enough, not even close.
Even a 4cyl with Renault UN1 tranny is a long item!
For the F1 cars with dependence on a very tight coke-bottle waist and tapered tail, they need the thinnest transmission they can get. They also have a long wheel base!
For an LMP car with a body, the thinness of the transmission isn't an issue, but the compact center of mass and reliability is. also the diffuser ramp angle probably works better with a short transverse trans-axle.
Here's an explanation of why Xtrac used a transverse box in the LMP1 cars
XTRAC ENTERS 2011 RACING CAR SEASON WITH FIVE NEW GEARBOXES|European Motor News
For 2011, Xtrac is launching an entirely new transverse gearbox designated the ‘1059’ which is designed to meet the new Automobile Club de l’Ouest (ACO) LMP technical regulations. The new transmission will benefit from Xtrac’s latest developments in casting technology, differential and gearchange philosophy and weight reduction all within very tight cost targets. The gearbox has also been designed for ease of installation of kinetic energy recovery systems and is particularly suited to the Flybrid flywheel system.
The ‘1059’ transmission is housed in a generic main case designed to suit various engine and chassis configurations. With the primary objective of delivering excellent reliability and the ultimate performance, the new gearbox delivers a cost-effective solution and has also been designed for ease of servicing and assembly. The design has been optimised for maximum efficiency by ensuring the minimum number of gear meshes, and its inherent reliability stems from the proven configuration, while its light weight and low centre of gravity have been achieved through mass optimisation of the internal components and main casing.
With an input to output length of only 288mm (excluding the separate bell-housing) the transmission is as short as possible for increased rigidity and minimum packaging dimensions. It also retains the ability to change the gear cluster, which is positioned ahead of the differential, without disassembling the rear of the car.
The 6-speed transmission’s dog engaged sequential gearshift has been engineered to suit the latest MegaLine ‘Family 2’ or ‘OEM 2’ Assisted Gearchange Systems (AGS) and is compatible with other popular AGS systems.
The Elise has a short wheelbase, and short overhangs. With the engine and transmission being so short, it has a very low polar moment of inertia. It changes direction very fast. That's good for tighter, shorter courses, but not necessarily for higher speeds and higher power levels. Hence, why Lotus went to a much longer wider car for the Elise GT1 in 1997.
Hey look at that from Page 2...
That looks like a transverse Hewland 6 speed TGT 200.
All this is just to say that there are many options, depending on packaging requirements. No reason to say one is better than another... There is an option for whatever somebody needs to package.