How do government purchases crowd out the private sector? I am curious about how government purchases crowd out the private sector (if it does). If we look at a graph of the composition of US GDP, it seems that government purchases and investment are somewhat negatively correlated. It's obvious during WWII that government purchases skyrocketed while investment shrank significantly.

I am wondering about the intuition behind why this happens. If I had to guess, it's because at a given snapshot in time, the capital and labor in the economy is limited, and if the government is spending more money to use capital goods and labor, then there are less capital goods to go around for the investment. Is that line of thinking correct?
Just to add some more besides the answers above:
Short answer: by influencing interest rate.
Explanation:
In the post Keynesian literature what has come to be appreciated a lot is that government purchases, backed by increased government debt, increases interest rate. Why? Well, that's in itself an interesting explanation and perhaps should be a separate question (interesting, because contrary to what people think that &quot;more govt borrowing means more govt bonds in the market, means lower bond prices and hence higher interest rates&quot; is not at all a satisfactory explanation).
Private investments are assumed to be a function of interest rate. So some of the investment projects (particularly, those at the margin) that were earlier profitable may not be anymore due to increase in interest rate.
This is what is essentially, crowding out of private investment.
This does not require the assumption that Savings have to be fixed. Instead, in Keynesian framework, what happens is that $Y, S, C$ all goes up (because crowding out is not necessarily full, depending on the interest elasticity of money demand - slope of LM curve). It's just the share of $G$ increases and that of $I$ decreases.
Coming to your assessment that historically, at least during some periods, $I$ and $G$ have been found to be positively correlated. Indeed, investment is not just a function of interest rate. It is also a function of sentiments of future of the economy. When govt's start building infrastructure or take measures to improve supply constraints it boosts the confidence in the economy and encourages investment.
That doesn't make concept of crowding out incorrect. Because the concept is applicable when, ceteris paribus, $G$ increases.
Lastly, your own idea that &quot;the capital and labor in the economy is limited, and if the government is spending more money to use capital goods and labor, then there are less capital goods to go around for the investment.&quot; is the somewhat closer to the classical view. This assumes that economy is at its full potential and there are no rigidities in the labour market. Without going into details, this view over the year has been seriously challenged. However, it should still be considered as an alternative explanation.