Excellent question! His remarks are typical of placing the blame elsewhere because he feel directly responsible himself. Psychiatric projection.
The sheriff has no say so in who is allowed to buy a gun. Either the state can run a background check or the state can do nothing and the dealers will run the background check through the FBI. In this case, unless the nut had been involuntarily confined to a mental hospital for more than an observation period, or unless the police had arrested him for his threats where a judge had ordered him to surrender all firearms until he was judged not to be a threat (or he was convicted of a felony) there would have been no reason not to sell him a firearm.
It appears that Loughner should have been arrested by the police for making threats and charged. While in custody, it would have been fairly evident that he was mentally unbalanced and should be committed to a mental hospital.