Cars to computers always seems to be a poor analogy. But you can replace the ECU with one of your choice. In fact, there is an industry designed specifically for getting better performance from your car by customizing the ECU.
> But you can replace the ECU with one of your choice.
As a counterexample: There are certain maintenance procedures for late model Audis that can only be done at the dealership. The diagnostic tool is connected to the car and then phones home to a central system to get vehicle-specific codes required to perform some actions. One such action, oddly enough is getting the car to recognize a new ECU[a].
[a] you can circumvent this by reflashing another ECU with special firmware to become a 'clone' of the original but this would be very analogous to having to 'root' your phone to install different software.
You don't get the "keys" for ECU, unfortunately.