Is there a financial motivation for organizing a summer school? Do professors and scientific staff of an institute make money from summer schools?

Or is it a well-intentioned unpaid activity done by organizers?

For example, a summer school about a topic in mathematics.
Whithin the universities that I've been affiliated outside the US, there is no financial gain in a math department organizing a summer school, as there is no tuition.

Usually, they should submit a proposal for a funding agency that will cover the costs of the project.

The reason for doing summer schools is for advertising the department and their graduate program outside their regional area. The department may also be interested in boasting a particular research project/area.

One can also squeeze a few activities in the project with a collaborator far away, so the project would also serve for other research activicies not publicly advertised, by paying for his/her visit.