>>If, over the long term, CAPEX spendings do not produce profits, it means that the purchased assets did not produce enough payoff to compensate for their depreciation charges.
Even if CAPEX generates profits, if the returns were lower than your capital cost then company would have been better off not investing and returning that instead to shareholders.