The principle of competition applies to individuals within both private and public organizations. However, it applies to private organizations much more than to public organizations.
People in public organizations must often compete against one another. Not all of the planners in a city planning department (a public organization) can become the senior planner or the planning director. They must compete to get the best jobs. This, of course, happens to people in private organizations as they compete for promotions.
Private organizations must compete with one another for customers. Two restaurants in the same town, for example, are in competition with one another. The same is not true of many public organizations. There are some, like the Post Office, that must compete with private organizations like UPS. However, there are many other public organizations, like public schools, that typically do not have to compete.
The question--does the economic principle of competition apply in both private and public organizations--is vague with regard to the definition of "public organizations." While that term, "public organizations," can be assumed to refer to government agencies, it can also be applied to publicly held non-governmental organizations and to non-profit organizations. For the purposes of this discussion, it will be assumed that the intended definition is government agencies.
The principle of competition is much more limited in the public than in the private sector for the very obvious reason that public or government agencies exist to serve a single or narrowly defined set of responsibilities, such as oversight of private organizations or the administration of public welfare services (e.g. the Social Security Administration). That being the case, opportunities for competition are obviously restrained. Public utilities represent the most common example of organizations that are understood to be immune from the pressures of competition, although the most prominent example, telephone service, ceased to exist as an example with the introduction of the Internet and cell phones.
There does exist one area in which competition among public sector organizations does exist and functions reasonably well: state-owned universities. States maintain university systems spread out among major cities and towns. While colleges and universities mostly draw students from local and surrounding areas, they also compete for students from other states as well as from within the state. However, while this does constitute competition, it does not really occur within the economic model applied to the private sector. Tuition fees, for example, are set by the state legislature, and funding for infrastructure and facilities is budgeted through the state using taxpayer dollars. Competition, then, comes from each academic institution's ability to offer programs and, occasionally, financial aid packages unavailable at competing institutions.
Government agencies can also compete among themselves in other areas, such as financial services. Fannie Mae and Freddie Mac, for example, competed directly for the home mortgage market. While these two organizations are technically known as Government-Sponsored Enterprises (GSEs)--in effect, private entities created and overseen by the government--they qualify as public entities for the purposes of this discussion. How well that competition turned out is the subject of considerable debate since the housing crisis of 2007–2008, but the two entities did directly compete.
Competition is a cornerstone of a free-market economy. It cannot, however, function in a regulatory vacuum, or compete head-on with publicly funded entities, such as government agencies. Competition among public organizations is, by necessity and definition, extremely limited.