Besides, people have been tuning their cars for 100 years now, you'd think that by now the police had some experience keeping the worst specimens of the public roadways.
The emissions (and taxes in the countries where taxes are a function of emissions) aspects are more likely to be the justification of any repercussions against these activities.
Couldn't the same case be made for doing your own mechanic work, though? We have braking, which is hydraulic and throttles which operate by wire. There's nothing preventing you from replacing the tried and true hydraulic brakes with something that runs on bluetooth. That would be just as dangerous as messing with the software of modern car brakes. More so, since one would hope modern car software has some failsafes built in[0].
[0]: they probably don't, but I know Sevcon does. Sevcon is a company that makes electric vehicle controllers for EV vehicles. They're popular with the DIY e-motorcycle crowd. Messing with the settings directly affects the power delivered to the motor.
Copy/pasting code from the internet is easy, so it has to be made artificially difficult. We live in a world where people put their iPhones in microwaves because they heard it would charge the battery. We have to keep these people very far away from the internal workings of their cars.
If you're curious, you should poke around http://endless-sphere.com/forums/.
Even with needing special hardware and software I'm not happy about it the tinkering. Cars are too much: 3,500 lbs of metal going 40 mph with 10 gallons of gas in it is a lot to go wrong.
I hate DRM, I really do. And I think we should have kids programming Arduino's and Raspberry Pi's by junior high, but part of me thinks they should bury the computers so deep in the engine bay you have to pull the engine to get to 'em. It's just my opinion, but if you don't have a (relevant) PE license, minimum, you shouldn't be allowed to mess with ECU's in cars that go on public roads.
An obvious reason is that the manufacturers do not want to deal with warranty issues. Of course you can probably understand that the possibility is there that bad software can result in engine damage. This applies to other systems, too, for instance the guy who demonstrated that he could alternately flash his headlamps like a police car by sending traffic to the lamp controller probably does not realize that he should not be reigniting the HID lamp every couple of seconds, because this will shorten its life.
The automakers are liable to laws in every developed country. The United States has these average fuel economy laws that the carmakers must meet, and in some states, harsh emissions regulations must be adhered to and guaranteed. The emissions testing regime in some of these states has done away with exhaust gas analysis and relies on the engine control's self-diagnosis to show that the vehicle is performing to spec.
However in other countries, increasing pollution emitted by a car constitutes tax fraud.
Road safety is also important. One German carmaker uses the same diesel engine for a range of vehicles which have differing performance levels. I thought it was clever when I found that you could change the low market six cylinder from a cheap model to give the power output of the top model of the range simply by carefully changing eeprom data. But the low market model has a lame exhaust and small brakes. Triple the engine output power and this is potentially a disaster.
For as long as the universe of tinkerers will include those without experience or scruples, the carmakers will have to keep developing anti-tampering measures to show that they are attempting to guarantee that their products will perform within the bounds of the law, and indemnify them against bogus liability and warranty claims. Some tinkerers are smart enough to see the big picture and think about the results of what they are doing. Others either don't realize that these systems were designed by teams of engineers with more degrees and experience than them, or figure that they can sell genitalia enhancements to any twentysomething that walks in the door. These are the guys that scare me.