Yesterday while cooking I set off the smoke detector, no I did not burn anything. They go off when I cook over a high heat. And yesterday once they started going off they would not stop. I ended up having to disconnect them all (they are hard wired with an interconnect) and I replaced them this morning. Aaaaaaaand let me tell you, I had a sleepless night last night knowing there were no detectors installed.
https://www.southernliving.com/how-often-should-you-replace-smoke-detectors-8774122


What’s the reason behind that legislation?
Safety. What else?
You can see a news report from when it came into force here: https://www.bbc.co.uk/news/uk-scotland-60203081
The guidance is here: https://www.gov.scot/publications/fire-and-smoke-alarms-in-scottish-homes/pages/where-and-what-to-buy/
Which includes this part on batteries: