This is a very good question. Non-profits and tax exempts are allowed to operate for profit businesses under the umbrella of a non-profit. However, this gives rise to a host of other important issues that need to be discussed with a CPA and preferrably a tax attorney well versed in tax-exempts and non-profits. Certain rental activities and use of borrowed money are primary examples of issues that can cause certain income to become taxable for both your non-profit and for-profit activities. Also, 501(c)(3)s have restrictions on the extent to which they can engage in activities unrelated to the non-profit aspect of the normal business. You really need to consult with someone to do this right.
This answer is based on general legal principles only and is not intended to provide specific legal advice. This answer is for informational purposes only and does not constitute the formation of a lawyer-client relationship. Any reader of this answer should not make decisions based upon in without first directly consulting with an attorney
The short answer is yes, but there is a clear limit as to how much can be earned for activities not for the organization's purpose. Please see my published article on this for more: http://www.rocketlawyer.com/article/non-profit-compliance-checklist.rl
I welcome you to contact me for more, or for legal representation.
I agree with the attorneys above. Yes, you can operate for-profit entities to support a non-profit organization, however, there are lots of rules and regulations in doing so. Operating a for-profit business to fund a non-profit entity is very common, but also can be very risky if not structured properly. There are several alternatives in properly structuring these types of arrangements, and lots of articles and literature out there, however, you should still contact a tax attorney with experience in these matters, as the consequences of doing this incorrectly could include losing your 501(c)(3) exemption (and state exemption), which could leave you with a large tax bill.
I have helped a number of organizations in setting these types of arrangements up, and nearly all of them have needed some tweaking in order to safely comply with applicable tax rules. Seeking competent counsel here is absolutely necessary in my opinion.