The shells absolutely add a lot of flavor. If you wanted to make a shrimp stock you just need to boil the shrimp shells and you have a very flavorful stock.
I agree with Andy that there are times when flavor should be sacrificed for ease of eating. I do not want to be in a nice restaurant or at a nice affair dressed in good clothes trying to negotiate getting shrimp covered in sauce out of the shell. As much as I love shrimp, I skip shrimp in the shell if I am in that sort of situation.
A compromise that one of the restaurants I frequent uses is that they peel the shell off mostly, but leave the tail and last little bit of shell on. I can then use my form and knife to easily cut the tail piece off. I loose a little bit of the shrimp that way, but I remain clean and the shrimp do not go flying all over the place. I am not sure how much flavor that little bit of shell actually adds though.