On Apple trying to ban Samsung products

Why, just why is Apple investing millions in lawyers in order to ban products instead of making better ones to tighten their leading position?