Cost of using primary schools for polling

Regarding the recent referendum and all other past and future vote casting, can someone explain to me why hundreds of these polling stations are in schools?
On my way through West Cork on the day of the referendum, I counted eight schools that were closed for the day and were being used as polling stations, these schools probably had an average staff of more than 25 people, this is a wage bill of approximately €3,500 per school.