The chief executive officer of Samsung Electronics Co. is stepping down in a surprise resignation after decades at the company, saying it needed new leadership following a bribery scandal that led to the imprisonment of its de facto chief.