GS has a track record of working well with the OSS community. They open-sourced and maintained GS-collections (now Eclipse collections), a highly-performant Java collections library that they had developed internally. They benefitted from community use and contributions, but no more than any other company that open-sources an internal project.
GS benefiting from open-source doesn't imply malicious intent.
But them making a decision to benefit themselves is not necessarily mutually exclusive to a decision that benefits other developers and the OSS community. Your point is valid, but just want to clarify that it isn't necessarily all negative.
It's likely not a huge profit decision, and the path to profit is likely very indirect. They did it probably because
- it increases its brand awareness/respect for technical customers, potential job candidates, and business partners
- it can teach finance and CS students about basic algorithms used in the industry. In some industries, it is healthier for a company's technical edge to not be so far ahead of competitors.
- the open-source """community""" (whatever that is) can find bugs and extend the software for the benefit of GS. I highly doubt this is a motive, but it's a possibility/daydream.