Because there are valid use cases that would need that capability. It’s not recommended and the developer is required to explicitly override it which is them explicitly choosing to use that option which they should be aware of the consequences.
Implicitly declaring parameters at use time gets rid of the value of predeclaring parameters. We don’t have support for it right now, but we’d like to be able to do things like define interfaces including parameters, they could then be automatically declared by the node and then declaring new parameters would be disabled. It’s also valuable to be able to audit the declared parameters separately from using them. As an example if two of us are writing code and I implicitly get and declare a param ‘foo’ as a double and then you implicitly get and declare a param ‘foo’ with integer it’s behavior will be dependent on runtime race conditions, and much harder to debug. Whereas it’s much easier to see, oh hey, two places are declaring the same parameter, that’s not valid.
It’s definitely a little bit more overhead to separately declare and then use the parameters. But one of the lessons we’ve learned and are building into ROS 2 is that being able to be knowingly correct is very important. This is along those lines of keeping the declarations separate from the usage.