Governments and Corporations Are Effectively a Single Entity
Libertarians tend to bitch about government and laud corporations. Socialists tend to bitch about corporations and laud government. The problem with both general attitudes is that government and corporations are so tied together that they're effectively the same thing. This makes sense since the entire idea of a corporation was created by government decree. Since corporations rely on government for the special privileges that they enjoy, it's also not surprising that they so frequently act as an arm of government:
A company that operates 46 shopping centers up and down California has been providing sensitive information collected by automated license plate readers (ALPRs) to Vigilant Solutions, a surveillance technology vendor that in turn sells location data to Immigrations & Customs Enforcement.
The federal government's intelligence apparatus wouldn't be as pervasive as it is if it wasn't for the help provided by private corporations. Socialists are more apt to point this out than libertarians. However, libertarians are more apt to point out the fact that such arrangements become more prevalent as the size and power of government increases. The people who operate a corporation do so to make money. If a government is small and poor, they are unable to offer the money that will attract major corporate attention. If a government is large and wealthy, they can attract corporate attention with the offer of big bucks.
So many corporations are involved in the defense offense sector because the military of the United States receives a tremendous amount of wealth from Congress. If the military received a pittance, few corporations would be involved in it. Likewise, Congress sets aside a tremendous amount of cash for federal law enforcement (usually under the guise of national security) so a lot of corporations are involved in the law enforcement industry.
This cycle doesn't stop with government feeding money into corporations though. With the wealth obtained from government contracts, corporations are able to influence the government by handing some of its wealth back to favored politicians who will ensure that conditions remains favorable to their patrons.