Goldman Sachs is able to see orders before they are executed, and know in advance when orders will come in. So they buy the stock, driving up the price, and sell it back to the slower traders at a higher price.
Much of Goldman Sach’s profit seems to be based in using inside knowledge to take money from other investors.