Why would a professor write many recommendation letters?
The answer is simple: you generally only write one letter per person and only customize it insofar as changing the name of the institution to which it is sent (if even that: "Dear Admissions Committee" works pretty well). If there are very different types of programs involved, you might customize a bit more, but not much. That means the incremental work needed for many letters is not much more than is necessary for one.

If you think about it, it should make sense: a recommendation letter is primarily about the candidate, not the institution. If a recommender writes the best letter they can for one institution, how much could it vary and still be the best letter for another?