For sure, the car companies also create technologies to make it prohibitive to get your car diagnosed and repaired elsewhere, in addition to providing the dealers (i.e. "requiring dealers to buy") the diagnostic tools to help them fix their brand's vehicles. Software has taken this even further, and will surely continue in that direction (I used to be able to fix pretty much anything broken on my car, but no longer these days!).
On the other hand, as shady as they are, automotive dealers are very consumer driven, compared to the medical industry. For instance if Kia dealers get a bad wrap for providing bad or predatory service, then the word gets around fast and their sales drop.