The online retail giant spent more than $4 billion in the second quarter to clean warehouses, hire employees and entice them back to work with temporary pay raises while much of the country shut down. That push paid off as customers shifted from buying groceries and emergency supplies early in the pandemic to bigger orders with electronics and housewares to settle in at home for the long haul. Second-quarter revenue jumped 40% from a year earlier to $88.9 billion. Earnings were $10.30 a share, beating analysts’ average projection of $1.51 per share on sales of $81.2 billion, according to data compiled by Bloomberg.