Why did God kill Er?


For being evil in the sight of the Lord

Er, the firstborn of Judah, was evil in the sight of the LORD; and he slew him. 1 Chronicles 2:3