Basically cost of doing a production run.
There's an initial investment in tooling and such required to produce the brass and load that specific cartridge. That's about the same cost as any other cartridge really, but it's an investment that must be amortized over a much smaller amount of ammo.
Think about it. Lets say it costs them $25,000 to gear up to sell a round.
They expect to sell 1,000 boxes of of .338 Lapua per year.
They expect to sell 200,000 boxes of .308 Winchester per year.
These numbers are completely made up, but you get the idea - each box of the less popular round will cost more because each box has to pay back a larger portion of the tooling investment.
Then there are the simple labor costs of setting everything up to do a run (they won't be constantly making a particular round). Runs of popular cartridges will be done in much larger batches. Runs of niche cartridges will be done in smaller batches.
It's also affected by simple competition - both for the manufacturer and from the vendors. For manufacturers, not as many people are making the round. Few sources will mean less competition, and hence higher prices. The same situation happens again when it hits retail shelves. Most people can buy .30-30, .270, .308, and other such common rounds at their local Wal-mart. Anybody wanting to sell those has to temper their prices with the realization that if you charge TOO much more, the customers will run there and get it cheaper. Niche rounds only available in gun-shop though? They have a lot more leeway.