Marx didn't actually claim that labour should "get all the profits" - in fact he went to great lengths to explain his criticism of the contemporary socialist movement for demanding that (in
Capital, Volume 1). Instead he differentiated profits from surplus value, the latter also containing the share of profits needed for reinvestment, further capitalization of the company etc. He criticized the 19th century socialists for demanding
all profits should go the workers, because that would mean the inevitable failure of the company (the competition would reinvest, furthering productivity, and in the end outcompete the company paying out
all profits).
Instead, Marx argued for worker control over the profits.