You can do that even within a company. You certainly dont need separate share classes.
Can you break out revenue in a single company? Sure. But you can also easily do it with the structure Alphabet adopted. And, this structure also lends itself to easier valuations of entire units, useful if acquisition of a unit is something being considered.