It depends on how it's presented. Will learning the art itself teach you respect, etc. No. However, learning a martial art does teach discipline. You have to practice and have extensive control over your body to master it. Whether or not that discipline carries over to other aspects of your life is up to you and your instructor.
I do, however, think that learning a marital art is a great opportunity to learn respect etc., but it requires the instructor to be on board.
I've studied three different Marital arts under three different instructors, and each had very different methods/philosophy.
My first was a children's class for Tae Kwon Do, so it was presented in a "made for kids" type way. The instructor made it very clear, however, that we were learning self defense. Get into a fight at school, don't bother coming back to class. No questions asked, no discussion. I wasn't able to stay in the class for long due to financial reasons, but I do feel that it facilitated respect due, in part, to the deference that was expected towards members of higher rank, who were, in turn, expected to mentor and encourage the lower ranking members.
I didn't get into another class until almost a decade later when I started studying Tang Soo Do. That class was a travesty. The instructor never participated in the class itself, expecting the senior students to run things, which meant that we were at the mercy of whichever one was present. Some were ok, but most were simply obnoxious twenty-somethings who wanted to show-off. The only respect that was expected was to higher ranks. Students could treat peers and lower ranks however they wanted. The class was, essentially, a way for the instructor to make money. Nothing more.
And then, about 2 years ago, I started studying Nihon Jujutsu. This was easily, the best class I've had. The art itself is the most destructive one I've learned. The philosophy is, if you put someone down with NJ, they should stay down. Virtually every technique was designed to break something, which means you need to be very careful when practicing. That's where the discipline comes into play. If you act like an ass and apply more force than you need to the rest of the class will start doing the same to you (we had a guy do this. He quit.).
It was also the most formalized class I had. We had very specific and very formal methods for beginning and ending the class. This aided the sense of gravity and respect the class projected. There was a great deal of respect between all members. It was not a simple art to learn so you honestly had to respect those higher than you, and they in turn, knew what you were struggling with, so they helped as much as they could.
And the instructor was Awesome. He would greet new students by jumping on the mat, pointing to himself and saying "Sensei" jumping off again and saying "Dan". The point was that on the mat, you had to treat him as the Sensei at all times, but off the mat, he was just a normal guy.
Sadly, the dojo had to close due to lack of funds. The lease they had expired and the landlord wanted to triple their rent.
The short version, is that the art itself does not teach respect, etc. As the OP said, it's just a way to hurt people. The way it's presented, however, can teach respect, etc. if you get a good instructor.