What is the purpose of gaps in the road on bridges?

Expansion and contraction with heat and cold causes the road to swell and shrink. the gaps are for that purpose so the road or bridge would buckle and break if they were not there! Before this was discovered things broke often