If in most cases damages cannot be recovered or the criminal will never be caught in the first place, then what is the lesson being taught? Doesn't that just create a moral hazard where you "randomly" choose who to penalize?

It's about sending a message.

The message being you’ll likely get away with it?

They're setting up a pretty simple EV calc:

(Probability of not getting away with it) 0.01 * (Cost if caught) 1000 = 10x (Expected Cost) = not worth it

The EV calculation completely goes away if you add a layer of limited liability corporation.