Capitalism DOES do this all the time, but bankruptcy is the safeguard against this among private companies in a capitalist system. If your outputs are not more valuable than your inputs over a long enough period of time, you will be bankrupt.
There is no such safeguard among publicly run, financed, incented, funded, etc companies or organizations. Their outputs can remain less valuable than their inputs over an indefinite period of time.