You get paid less than you deserve but still more than you would get in most other less profitable firms? No one wants to fire the guy who takes out the garbage every day, literally or metaphorically.
If you're fixing software, you're either fixing your own bugs or someone else's bugs. There's bug tracking software; these metrics are visible. If you're fixing your own code, you're also adding functionality (presumably you wrote the code you're fixing). If you're helping to fix other people's code, they will notice. People talk.
I've personally seen almost an entire team disbanded, the work outsourced. The people kept? The guys who fixed things, who made sure it shipped at the end.