system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do American semi-trucks (18 wheelers etc) exclusively use inline 6-cylinder engines, no matter if it’s a Mack, Detroit Diesel, Cummins, or Volvo-built engine?

I get why they are diesel, but why are they all of the inline 6-cylinder configuration? Why not V6 or straight 8 or freakin huge inline 4-cylinders?
gpt
Inline-6 cylinder engines have a unique characteristic: they can have perfect primary and secondary dynamic balance without needing a balance shaft.

Essentially what this means is that the forces on the engine caused by the pistons and whatnot moving around mostly cancel each other out, and the engine runs very smoothly without needing extra, very heavy parts to dampen the vibrations.

All other engine types (V8, V6, especially I4) have imperfect balance, and V6 and I4 engines have bad enough balance that they need the heavy balance shafts to reduce vibration.  I6 engines (and engines made of I6s like V12s) don't.

As the mass of the moving parts increases, the forces involved increase, so by the time you get to the size of engine needed to move an 18 wheeler, you're dealing with some truly massive forces.  With anything other than an I6, this would mean monstrous vibration or a stupidly heavy balance shaft that would take a lot of engine power to spin.

Thus, for large engine applications, I6s and V12s are an easy choice.