Question

Can someone explain to me why the top reaction is E2 and not SN2?