There are a lot of reasons for a pellet gun rather than a rifle. Many airguns are a fraction of the cost of a rifle. Ammo is much less expensive than bullets, and much less dangerous for someone to get "caught" with them, such as at airports and at schools. Generally less range than rifles, probably a couple of hundred yards max for most of them vs the old "range one mile be careful" .22 admonition. Heck my .17 calaber rifle has a two mile range. Airguns are generally not as loud, lighter weight, etc. Yes you can buy a thousand dollar airgun, but you can't buy a rifle for $29.95 and you can get a decent airgun for that. There is a place for everything and the airgun fits many applications.
Bing