Soccer World Cup audience is huge and a driving factor for player salary = high participation rate. Whereas hockey's annual World Championship and World Cup and this baseball WBC have little or no impact on salaries.
Pro golfers are basically mercenaries. They have endorsement contracts but the Oympics isn't going to be much of a factor in the endorsement amounts.
For some players there is national pride at play, but for many others, its simply a financial decision.