Gas pumps seem to only output the gas they first started pumping out after a reload or after they are built. After reloading, some pumps may still be working as you intend, but some may have switched to a different gas. The pumps will be filled up with all the other gases they intake over time (Contents on the Details tab). I've tried all sorts of changes past the output (gas filters, gas valves, all kinds of messy piping), but could never get a pump to stop outputting the one gas they are stuck on unless I destroy and rebuild the pump or reload. Losing power or disabling and re-enabling the pump also doesn't work.
What controls the gas that will be first pumped out is hard for me to tell. It does seem to consistently choose the same gas when reloading the same save every time. It seems to be based on the contents inside at reload and not the first gas it sucks in. For example, I have a pump with mostly CO2 around and it is pumping CO2, but it got a little hydrogen in the area once and it had some in its contents. If I save when the CO2 is all pumped out (contents show 0.0 kg) and only the hydrogen is left in the contents, when I reload it will pump that little hydrogen and never output all the CO2 it continues to intake.
I can't tell which gas it will choose to pump from the contents after reload. It's not alphabetical or based on amount of gas or order in the list, as far as I can tell. Maybe it's the order they were sucked in?
So as a current work around, people can make sure all pumps contain some of the gas they wish to pump when they save (difficult with many pumps). And, the pump can easily contain many kg of other gas that has filled up in the pump while pumping the gas you want. So if you save and reload and pump out the bad gas, then save and reload again when there is no bad gas in the contents, you can eventually get it to have the gas you want.
Related to this is the gas filters, which don't really work as intended if pumps are only outputting one gas all the time. But, they can be used as a safety guard for when you reload and the wrong gas gets pumped out. Set the filter to send only your desired gas to where you want it and vent the rest back into the room or elsewhere. You'll never get gas flowing down both routes at the same time, but since all the other gases are stuck in the pump, when you reload you can switch to the other path and then reload again to switch back. Not user friendly, but I think it can be done.
There are several other bug reports about gas filters, and gas pressure problems, and gas pumps turning off. But I think most gas pumping problems are related to this.
EDIT: I've added save files with my comment below.
Steps to Reproduce
Have a room with multiple gases and a pump pumping for some time to anywhere (pumping to filters may cause nothing to leave pump depending on the settings). Observe it always pumps that one gas. Pause and check the contents tab, reload, and see what gets pumped. It should behave as described in detail above.
This issue has been fixed in either a future version or updated in a previous version.