What a fantastic question! I learned a lot researching this one.
The use of a simple piston-in-cylinder engine on an ultra high
performance in-space stage seems to be out of place in a technology
landscape dominated by high speed turbomachines, fuel cells and solar
panels.
Didn’t we move into the jet age? How could this possibly be a good
solution? At the outset we, too, felt like we had wandered into a
technological twilight zone. The key to understanding is that the high
workload task for the system is not producing electricity or turning a
shaft to drive a hydraulic pump. Tank pressurization is the dominant
activity and it demands the delivery of enthalpy to the main tank
ullage spaces – whatever the source. The IVF engine is superior to
other lower temperature systems in that its waste heat is of high
quality and is sufficient to turn cryogenic liquids into vapor. Half
of the inefficiency of a heat engine is put directly to work pushing
enthalpy into a working fluid for pressurization and the remainder is
used to produce the small amount of thrust required to settle
propellants.
A turbine could be used for such an application but it would be
exquisitely small with extremely high rotating speeds to produce only
20kW with low density hydrogen as the working fluid. Provisions for
heat and shaft power extraction could be made but the overall
developmental complexity of cooling, lubrication, ignition, control
and power take off at this very low power level seemed daunting
compared to the IC engine. The use of such small turbines on ground
based installations is virtually unheard of. Virtually a whole new
technology would have to be developed at substantial cost and risk.
Similarly a fuel cell could be used to drive IVF with the advantage of
no high speed machinery and an extensive history of spaceflight.
Proton Exchange Membrane (PEM) cells have shown a tremendous amount of
promise in recent years. However, 20kW is a relatively large fuel cell
for flight applications and because all power is produced as
electricity (as compared to perhaps 10% for the IC engine) it must be
converted via motors to shaft power with their attendant switching
systems and losses. This grows the fuel cell to address conversion
efficiencies. Reactants are only consumed at a mixture ratio of 8 –
which is generally insufficient for regenerative cooling so unless a
bulky and costly radiator system is employed a larger flow of hydrogen
must be brought to the fuel cell to maintain thermal stasis. From a
consumables standpoint the fuel cell loses its advantage over the IC
engine. The PEM cell efficiency is founded on low operating
temperature which produces condensed liquid water which must be
disposed of without providing any benefit for vehicle settling. In
general, the use of a fuel cell system would be most advantageous for
crewed vehicles where the water produced has a strong positive
influence on vehicle mass. For cryogenic propulsive stages the cost
differential between IC engines and fuel cells likely favors the
former.
United Launch Alliance, Development Status of an Integrated Propulsion and Power System for Long Duration Cryogenic Spaceflight. Emphasis mine.
In short: fuel cells are too expensive & don't produce enough heat.