Others will no doubt reply with much more knowledge than I - but from a simplistic level: Most CapEx spending is turning cash into assets so doesn't result in a "loss" that shows up on the income statement.
For example: if you spend $1 Billion on a new factory, you end up with $1 Billion less cash, and add a factory worth $1 Billion to your assets.
That $1B asset will eventually be depreciated, but very gradually as a component of cost of goods sold for each piece of inventory produced from that factory.
In other words, increasing CAPEX today does nothing to your current gross profit. It will be slowly depreciated in to your cost of goods sold coming out of that factory in the future.