So, you took your car in and then the dealership started looking at it. They determined that it was going to be a bit more involved to find the problem and contacted you to let you know that there would be a charge associated with this.
You're upset with them because . . . ?
I would be upset.
"Hi, Dealership? My car is broken, can you fix it?"
"Let me take a look at it....hmmmm....we don't know what's wrong with it."
"That's weird, I guess I don't want you working on it."
"HEY! Give us money for telling you we don't know what's wrong!"
I don't expect to pay for any other service that doesn't do what is more or less promised--
Sometimes, in the world of highly complex vehicles, you are going to end up down a rabbit hole where you end up spending a significant sum of money, to solve a very obscure, and difficult to diagnose, issue. I have a buddy who specializes in drivability issues, and problems that other shops and mechanics cannot resolve. He and his employer own an extensive amount of equipment, tools, hardware and software that are specific to problem solving. His work day can involve test driving a vehicle with magnetic microphones attached to various locations on the suspension, while tracking a mystery "thunk" that other shops were throwing new parts at , repeatedly, but failed to fix. He could also be bench testing an electronic component, while watching it's performance on an oscilloscope, to see if it's still within design values. He could be working through a list of solutions, ranked by probability of events, and provided by a data service, based on data they continually harvest from the field, as vehicles age and fail. He might have your car hooked to a scanner that is proprietary to the manufacturer. This scanner is nothing but a useless brick unless you spent a thousand a year to pay the licensing and update charges. He is often tracking down issues from previous damage, everything from water intrusion, to repairs done by incompetent collision repair shops.
Fixing an issue might include spending time on a manufacturer's hotline, researching online, or consulting several subscription only data bases that cost over a grand a month to keep updated. It might include hours of removing/ reinstalling unrelated components and systems to access an issue that takes a few minutes and a $10 part to fix. There are often times where, after an hour or two of digging, he asks the owner of the shop to call the customer to tell them that he has ruled out the obvious stuff, all the easy answers, and most of the more difficult ones, without discovering the problem. The billing is now at two hours, and they want permission to continue?
This is the reality of modern vehicles. Generally, the better brand ones are reliable as an anvil, if they are maintained, and not abused. In many cases getting charged for NOT resolving an issue can be a difficult thing to wrap your head around, but that doesn't mean that it's not legitimate, or that's it's OK to decide that you have been ripped off, when you are actually paying for a legitimate service.