They don't make money from F1 it costs them a fortune, Honda spent around £1 billion and had little success prior to selling up.
If they are successful, road car sales, brand image etc all go through the roof.
So they are in it to win, but their motivation to win is to financially benefit the parent company, not simply for the glory of winning.