Muggles' Guide to Harry Potter/Major Events/House Cup

Overview
When entering Hogwarts School of Witchcraft and Wizardry, the students are sorted into one of four different houses: Gryffindor, Ravenclaw, Hufflepuff, or Slytherin. Every year, these houses compete against one another to win the House Cup, which is awarded to whichever house collects the most house points. These points are given out by teachers for good behavior or excellent schoolwork. However, the teachers can also take away house points for any rule-breaking or poor performance.

Event Details
While the House Cup is supposed to be awarded every year, we only see the actual award in Harry's first year. In that year, Slytherin House seem to have won the Cup for what we are told is the seventh year in a row, but in the seconds before the Cup is awarded, a number of House points are awarded to Harry, Hermione, Ron, and Neville, to bring the total for Gryffindor house above that for Slytherin house.

In Harry's second year, the House Cup is again awarded to Gryffindor, mainly due to the face that Harry and Ron earn 400 points for saving Ginny down in the Chamber of Secrets, and saving the school from closing.

We hear that the House cup is awarded to Gryffindor in Harry's third year, largely because of Gryffindor's winning of the Quidditch cup.

In all other years, the House Cup is barely mentioned. It is safe to assume that Gryffindor does not win the Cup in Harry Potter and the Order of the Phoenix, because of Professor Umbridge's partisanship towards Slytherin House. We also suspect that the competition was suspended in Harry Potter and the Goblet of Fire due to the death of Cedric Diggory, and in Harry Potter and the Half-Blood Prince due to the death of Professor Dumbledore.

Notable Consequences
As the Cup is awarded at the Leaving Feast, at the end of the school year, it generally does not have any direct consequences. However, competition for the Cup is important to the students through the course of the year, and gains and losses of House points are tracked quite closely. Harry, Ron and Neville between them losing a hundred and fifty points for Gryffindor in a single night, as happens in Harry Potter and the Philosopher's Stone, is grounds for their virtual ostracism by other members of Gryffindor house. And it is Harry's fear of losing yet more House points that prevents his investigating several questionable events that occur later in that book.

Analysis
Splitting the school into Houses, and then having a competition between the Houses, is a standard procedure in English boarding schools, and so it makes sense to have it happen at Hogwarts as well. It is uncertain why this is done, as having competition between houses tends to have a separating effect on the students; however, it does mean that there are closer relationships between people in each individual House. Inter-House competition also provides an outlet for the students' excess energy. At Hogwarts it is particularly important, as there are apparently no other Wizarding schools in England. Most English schools can create school-wide teams that compete against other schools, but with no schools nearby, Hogwarts must get all its competition from within.

It should be noted that Hogwarts has evolved a means of separating students by similarity of character, while the British private schools, and others working on the British model, generally use a more random basis. This does have the tendency of concentrating House Cup wins in the two more fiercely competitive House, Slytherin and Gryffindor; Hufflepuff, for instance, is mentioned as being a House that seldom gets any glory in Harry Potter and the Goblet of Fire. We cannot judge what effect this has on harmony between Houses, but we would guess that a House that consistently falls near the bottom of the House Cup standings may well end up resenting its position.

We hear that a major influence in the awarding of the House cup is the Quidditch cup, but we do not learn exactly how much of an influence it is. We know that it is not the sole determinant, of course, because with Harry out of commission at the end of the first book, the final Quidditch match is won by Ravenclaw, putting Gryffindor out of the running; and yet it is Gryffindor who win the House cup, with Slytherin in second place.

In Harry's first year, we can see that the House cup is of great importance to him, as it is to the rest of the school. At this stage in his development, Harry has discovered this literally magical world of which he had been previously unaware, and where he seems to be not just accepted, but actually famous. However, he clearly is insecure in this world, not yet sure that he is welcome, and afraid that his presence in this world is due to the disappearance of Voldemort. While Harry understands that he was involved in Voldemort's disappearance, he also knows that he had no conscious part in it, and so feels something of a fraud because of the plaudits that he receives for this disappearance. Because of this, he feels he must strive for acceptance in this new world on his own terms, and a large part of that is the Quidditch competition and the House points contest. This fight for acceptance makes Gryffindor's winning the House Cup in the closing chapter of the first book a much larger victory for Harry than his defeat of Lord Voldemort and Professor Quirrell a few days earlier.

As Harry matures, he becomes more secure in himself and in his position in the Wizarding world, and the House cup rapidly loses importance to him. He still cares about House points, and is heartened when he gains them or dismayed when he loses them; however, Gryffindor's winning or losing the House Cup is no longer a thing of which we take much note.

Greater Picture
As the House cup pales into seeming insignificance in books after the first, one wonders, what is the purpose of bringing it into the story at all? The author's intent is never clearly stated, but we can surmise that its purpose is to provide, by means of the associated House Points count, a quick and clear measure of Harry's acceptance into the Wizarding world. Harry is initially unsure of his welcome, despite his "hero" status, and is forever wondering if he is going to be unceremoniously packed up and returned to his hated Muggle home. This fear remains part of Harry's makeup until at least Harry Potter and the Order of the Phoenix, when the Ministry threatens to expel him from Hogwarts and snap his wand. Harry's being instrumental in winning the House cup, and publicly so, is key to his feeling accepted by Hogwarts, and thus by the Wizarding world. While his worries about not fitting in will remain, they are largely blunted by this one single event; and as it has had its effect, it does not need to be explicitly repeated.

However, the use of House points remains a constant throughout the series. The bestowing and removal of House points is used throughout the book as a way of indicating that students' behaviour is exceptionally good or exceptionally bad, and the egregious removal of House points, by Professor Snape, Professor Umbridge, Draco Malfoy, and others is used to highlight the ways in which those characters are acting unfairly.