The bike shops treat you that way because you go in there not willing to spend any money. They're going to show you the door pretty fast. You have to know what you need to pay for a quality bicycle. You want quality too. The car comparison really doesn't work. However, it wouldn't be smart to buy a car that wasn't safe to ride. It wouildn't be smart to buy a new one that wasn't put together properly or would likely have big problems after just 100 miles and begin to need to replace parts on it. You'll end up spending a lot more on the car then it's worth.
Buy the quality bike and your bike shop will back it. If you only ride casually then you won't need to worry about much maintenance, just make sure you keep air in the tires.
The bike shop can't pull things out of your head and they can't sell you a bike for as cheap as Walmart. So if you go in not knowing anything and setting a price-point below what they sell for then there's nothing they can do for you. You can't get a bike there or at any other shop for that money. They're offering you good prices.
I would definitely shop around and find a good reputable bike shop though. You're going to need to spend the money if you want the bike, and it will be much better in the long run.