Goldman advised investors to "Buy" Tesla (i.e. their "opinion" is that the stock is a good investment and should increase in price - quotes because of a well-documented positive bias of sell-side analysts) just before underwriting Tesla's offering (i.e. taking fees for successfully selling all new shares).