In my previous company, for some client I have written e-payment gateway plugin , since the code shipped from e-payment provider was pure horror(PHP 4, very old code). It is for a domestic e-payment provider here, and the implementation was very difficult for not so technical skilled people.
Anyhow, plugin is working correctly after testing, and since I saw a lot of people needing this, I spoke with my manager to open-source it on Github. He asked me why, and I said first of all because it's showing that the company is willing to do something free for the IT community, and second of course is to promote themselves and their services. You may think for most of the open source, that's is coming from some company, to be like first reason, and most people do. But in my opinion the second reason is what's all about, and it's perfectly normal to do it.
You give some part of your modules for free, and if people who are going to use it are interested in some extra customization with them, they will probably hire you to make necessary changes instead some 3-rd party, because nobody knows them like you do. Right? :)