Why do rocket engines have a throat? Diagrams of rocket engines like this one,

(source)
always seem to show a combustion chamber with a throat, followed by a nozzle.
Why is there a throat? Wouldn't the thrust be the same if the whole engine was a U-shaped combustion chamber with a nozzle?
 A: The whole point to the throat is to increase the exhaust velocity. But not just increase it a little bit -- a rocket nozzle is designed so that the nozzle chokes. This is another way of saying that the flow accelerates so much that it reaches sonic conditions at the throat. This choking is important. Because it means the flow is sonic at the throat, no information can travel upstream from the throat into the chamber. So the outside pressure no longer has an effect on the combustion chamber properties. 
Once it is sonic at the throat, and assuming the nozzle is properly designed, some interesting things happen. When we look at subsonic flow, the gas speeds up as the area decreases and slows down as the area increases. This is the traditional Venturi effect. However, when the flow is supersonic, the opposite happens. The flow accelerates as the area increases and slows as it decreases. 
So, once the flow is sonic at the throat, the flow then continues to accelerate through the expanding nozzle. This all works together to increase the exhaust velocity to very high values. 
From a nomenclature standpoint, the throat of a nozzle is the location where the area is the smallest. So a "U-shaped chamber with a nozzle" will still have a throat -- it's defined as wherever the area is the smallest. If the nozzle is a straight pipe then there is no throat to speak of.
A: Previous answers have focused on the fluid dynamics angle. However, you can also view it from a purely thermodynamic angle, viewing the rocket engine as a heat engine.
In order to get useful work (accelerated exhaust gases), you need some form of thermodynamic cycle with combustion followed by expansion. Due to conservation of energy, the amount of kinetic energy acquired by the gas will then be proportional to the amount of enthalpy (heat + pressure energy) that disapears as the exhaust gas expands and cools. 
This means you want to maximize the temperature in the combustion chamber and minimize the temperature of the exhaust to maximize your Carnot efficiency. You ensure this by making sure that combustion happens before expansion, with a separate combustion chamber and expansion nozzle. 
Furthermore, you want the gas to expand by as large of a factor as possible to minimize the exhaust temperature - and the expansion ratio is proportional to the area of the nozzle exit divided by the area of the nozzle throat. This means that from thermodynamic considerations alone, we can see that it is preferable to have a very tight throat and a very large exit area. 
Fluid dynamics determine the exact details of nozzle shapes (de laval nozzles etc) that get the thermodynamic efficiency as close to the Carnot efficiency as possible, and whether the exhaust will actually expand or instead separate from the nozzle walls. But the need for a separate combustion chamber and nozzle is much simpler and can be understood without any knowledge of subsonic/supersonic flow.
A: As addition to @tpg2114 answer, I suggest also to read about de Laval nozzle and Rocket engine nozzle on wikipedia.
Some typical values of the exhaust gas velocity
for rocket engines burning various propellants are:

1.7 to 2.9 km/s (3800 to 6500 mi/h) for liquid monopropellants
2.9 to 4.5 km/s (6500 to 10100 mi/h) for liquid bipropellants
2.1 to 3.2 km/s (4700 to 7200 mi/h) for solid propellants

so that definitely makes sense to have nozzle) 
A: The thrust of a rocket engine is a force caused by a net pressure force acting on the entire contraption.  The change in momentum of the combustion gases moving from the combustion chamber to the nozzle exit is only the physical means by which this relevant pressure difference is maintained.  Many undergraduates don't seem to understand these basic issues, and some of these misunderstandings are reflected in some of the answers here.
To understand this, draw a closed control volume that outlines the entire inside of the combustion chamber, the inside of the nozzle, and the exit plane of the nozzle.  In the simplest case, take a nozzle that ends at the throat, with no divergent section, and with a very short convergent section. In this case, the exit plane of the nozzle will be at atmospheric pressure and the exit Mach number will be unity.
Assuming the static pressure within the combustion chamber to be uniform, all pressure forces acting inside the control volume essentially cancel, except for the atmospheric pressure forces acting on the exit plane and the combustion chamber pressure forces acting on the area projected by the throat on the front end of the combustion chamber.
The net force on the control volume is thus equal to A*(Pc - Pa), where A is the throat area, Pc combustion chamber static pressure, and Pa atmospheric pressure.  With such a state of affairs, it's easy to see that it's pressure forces that move the rocket.  To say that the change of momentum of the combustion gases moves the rocket is not incorrect, but without understanding the role of pressure forces, one cannot truly have a grasp on how a rocket is propelled.
We can now extend this reasoning to the case that has the usual divergent nozzle section.  In doing so, we understand that the advantage of such a section is due to the fact that atmospheric pressure can now act on the nozzle exit plane with the existence of a much smaller throat area.  The smaller throat area produces much less mass flow of combustion products, and so, a convergent/divergent nozzle allows a much more efficient use of combustion gas mass flow, in order to allow atmospheric pressure to act on the exit plane of the nozzle.  Without the divergent section, a much larger mass flow would be needed to produce the same net pressure force acting on the rocket.
It's important to understand Newton's laws and the role of momentum change in regard to rocket engines, and the role of pressure forces is inexorably associated with the momentum change.  However, because this law is so basic and easy to apply, some people seem to truncate their basic understanding of how a rocket engine works.
