They already can: extension authors can specify that their extension only operates on specific URL's.
The problem is that most extensions are designed to work on all web sites, so you have to choose between security and convenience. https://yvanced.com/
Most users pick the latter and trust the former.