In the case of many/most (honest) non-profits, the operating costs are paid out of a combination of the dividends of an invested principal (endowment, having been previously donated by donors) and grants/current donations. Any operating profit could then be returned to the endowment, allowing the organization to maintain higher operating costs indefinitely, thus giving the organization more capacity to further their mission.