Actually it's neither necessary nor compulsory to get advance tickets to the Alhambra y Generalife. However, there are a couple of risks in not having one. First, the queue may be long and you may have to stand in line for half-an-hour to an hour. Secondly, they do limit the number of tickets sold per day, and once that limit is reached, you're out of luck.
Having said that, I was in Granada around Jan 3, 2002 and did not have advance tickets. I arrived at the Alhambra at about 10am and had to wait about 30 minutes to buy my tickets. At that time, part of the slowdown was that the Euro had just been introduced and there was some confusion because both pesetas and euros were being used, but whatever you used, you got change only in Euros.
Also, as far as I remember, there was only 1 place inside the premises that had some sort of "controlled entry" and that was the Nazari palace and this was necessitated by the tight spaces in some of the rooms. Anyway, the ticket to this palace had a time on it and you could only enter the palace at that time.