Today or tomorrow?
If a company has to spend more than they make today in order to build something they can sell for profit tomorrow, that's investing in the future.
Just looking at revenue or profit is too simplistic. It's also too simplistic to only look at a single point in time.