Bad example. New factory is an asset, not an expense. Therefore it will have little impact on profitability.
I'd have thought comparing funding expanding Amazon's data centre capacity from revenue is very comparable to Tesla building out it's manufacturing capability the same way.
Amazon has also been doing a bunch of capital lease shenanigans so they could expand AWS without having to report GAAP losses over the last few years.