It's really a matter of basic economics ...supply and demand.
There are a limited number of older Pokemon games available since they are out of print. The collectors who have them don't want to get rid of them and wind up holding on to them for a long time.
When they eventually do put them up for sale, they charge a lot of money for them because there is a lot of demand, but there aren't a lot of copies available.
Also, a lot of the kids who grew up playing these older games are now nostalgic adults. They are willing to spend a bit to get their old favorites from their childhood again.
Typically used versions of some of the older games aren't too expensive. For instance, you can get the old Pokemon Red and Blue for Gameboy for about $20.00 each used. However, if you want a new sealed copy, you can expect to fork out several hundred dollars or more.