What does ' cater to' mean?

Please explain the meaning of 'cater to' in these sentences and is it suitable to use 'cater to' in the second case? Are there any alternative words? I looked it up in Oxford dictionary and it means ' to provide the things that a particular type or person wants, especially things that you do not approve of' with an example:

they only publish novels which cater to the mass market.

And I wonder that the mass market or novels refers to the things in the definition and which does the action provide . That's the reason why I can't understand the meaning of 'cater to' in the sentence below. Thank you

Dangerous sports should be performed after sufficient training. Sport companies which cater to such sports should require a licence for providing such training