I've brought parts to garages when I've had my car serviced. Now I can understand why they might complain, like a movie theater which doesn't allow you to bring your own popcorn, but too bad. If they don't like it, I'll go somewhere else. On the other hand, I've only done that when I wanted OEM parts, and the garage was just going to get aftermarket. It didn't save me any money, but gave me more peace of mind.
As for what the garage charges for parts, that's a little more complicated.
A garage will order the parts from a local supplier, and get them delivered, same-day. Although they buy in bulk, I suppose because of the "free" delivery, you can often get the same price yourself as a walk in customer if you shop around. And that's one more thing, the garage isn't going to spend the time to shop around.
So even before their markup, they're probably paying more than you would, and aren't making as much on the parts as you think (if they're fairly honest, and yes, I admit there are unscrupulous types out there in every field).
Now, if you have the time to go out and get the parts on the internet, and can wait a few days for shipping, you can save a bundle.