I've thought about this before, and imagine I could encounter some pretty interesting problems as well as collect some pretty valuable experience, but I just doubt companies acknowledge or care about a lot of tech issues. Particularly if they shakes up established processes
You're bang on, they sure don't.
Which is why I am extremely selective in who I will work with.
My consulting gigs are generally just favors for friends or friends of friends who are stressed out from having hired shitty programmer after shitty snakeoil salesman for the past few years straight... and are finally ready to bite the bullet and pay a few grand for whatever they need done... once and for all.
I would say that situation describes almost 100% of the consulting gigs that I have ever done.