If the opponents are aliens or alien-like humanoids, maybe the rifles have a design that is cumbersome or difficult for humans to use, thus making them unviable, if not e.g. bolted to a building or something?
Maybe they use a rare energy source as ammo, that is expensive and/or hard to get by? Or share an energy source as ammo that's more viable to use in something else, like powering up a vital building or refined into medicine, so using it as ammo would be a complete waste? Maybe the rifles themselves are made of a material that's best up-cycled into something else? Or maybe they're made of a material that's radio active or poisonous to humans so using the rifle would come with the added bonus of cancer, radiation poisoning, and other friends. Alien tech, so lets add in parasites..
Them having a biometric or other locking mechanism is also a good idea, something complex that's hard to crack, or something outright dangerous - make them booby trapped? Maybe the enemy knows the home civilization is greedy for their things so they use it as tactical advantag. If one in two rifles explodes in your face for high damage the risk of trying to make them usable is too high. Or they could be equipped with trackers, so taking the weapons with you would be a sure fire way to reveal your location to the enemy.
Or a combination of many factors?