People's definitions of hiking and backpacking differ. I very rarely carry a rifle backpacking, and I live in the Rockies where we have all manner of predators, from Canadian wolves to bears, lions, you name it. I always carry a large bore handgun, but I have no desire to carry a rifle on the type of Alpine backpack trips I do.
If I was down near the southern border, in AZ, TX, NM etc, I would certainly carry an AR as a reasonable precaution, though I would also probably consider seeking recreational opportunities that were less likely to have me encounter drug traffickers.
For local hikes I may take a rifle, but since I always have a handgun on me I am not too concerned from a defense standpoint. More often than not, if I end up shooting my rifle, it is at coyotes or rock chucks.