Isn't that their job? Your mechanic doesn't berate you for being a crappy driver, they get paid to fix your car when it isn't working
[0] The mechanic is also being paid by you to fix your screwup, in proportion to the severity of the screwup. Your colleague is not.
The DBA's job doesn't generally extend to fixing your code to use database features correctly, write SQL in a sane way, etc. Even if it does at your company, unlike the mechanic they're not being paid by you to do that work; they get their salary regardless. So it's natural that if you keep bringing unpleasant work to them because you're bad at your own job, they're going to get upset.