Firstly, a big part of the allure of CS50 is the fact that it's one big ol' nerdy computer party and you're invited!
Secondly, and I'm not trying to sell the Harvard mystique, but considering that Harvard's acceptance rate is 4%, the students handle brick-wall challenges gracefully.
Additionally, they don't necessarily want students that are going to do poorly in CS50 to pursue computer science at Harvard, so I'm sure it also serves as an effective bouncer for all of the students who haven't decided on their concentration deciding that they'll do CS because tech is sexy right now. The lectures look pretty straightforward, but we had to write code involving basic data structures and memory management in C on our paper midterm exams, with no reference, administered in a lecture hall. It's probably tough for kids that are used to acing everything, but it's a lot easier to find out you don't like CS in CS50 than it is to find out after choking on discrete math or a compiler class.
And as my first-year expository writing professor said after assigning like 70 pages of close-reading Kant for a weekly assignment, "Will it be difficult? Yes. Reading Kant is like running in sand. But that's why you decided to go to Harvard."
They also don’t want to allow the advanced students to “test out” of the intro course, as some schools do, because the advanced students may be highly skilled at programming but totally lacking in introductory CS knowledge.
Source: Am a high school programmer