Under the USSR, it was to tightly control who went in the country and to track their movements. Now, however, it strikes me as a moneymaking scam. You pay a fee for an invitation, you pay a fee for the visa, you pay a fee for registration. It also gives the police an excuse to shake you down for bribes if your registration isn't right (or they claim it isn't).
The country overall would make more money if they got more tourists, but I think those collecting the fees now don't want the system to change.