"That's why there should be background checks before someone can buy a gun."
Background checks are required in the U.S. if a gun is bought through a  licensed dealer. You do not need to undergo a background check if you buy a gun online, through a gun show, or through some private sales.