Flights are cancelled for numerous reasons here are some.
Aircraft has a Technical problem (no spare a/c)
Missing Crew member (sickness) (No Standby crew)
Weather unsuitable at departure or arrival aerodrome
Low yield of passengers make it uneconomical to operate
1 Flight route can be cancelled to operate another.
Security Reasons
Airfield unsuitable for operation (Closed runway etc unrelated incident)
There are many more but these are common reasons.
The Airline has an obligation to passengers when the flight is cancelled within their control. Not outwith.