Britain should have “Brexited” back then. She had her Empire, why was she worried about the Continent?
Britain had a simple grand strategy at the time. No European power was allowed to be dominate, and no one was allowed to challenge her at sea.
So that is why they defended the French at times. Balance of power (so Britain could have her empire) was the plan.
Because an attack on Belgium invoked requirements to honor agreements to defend that nation. It’s really as simple as that.