I did software dev at a marketing firm for about a year, and it was pretty soul sucking, so I know what you mean. I won't work at one again unless it's literally my only option.
I’ve been there too. The sad thing was that the people I worked with were genuinely great and smart people but you’re spot on about the actual state of the environment being a depressing and soul draining thing. I quit that job on moral grounds, I just couldn’t be a part of that any more.