Indeed, when done properly, the glue is stronger than the wood itself when both of the glued faces are edge-grain or face-grain.
A few circumstances come to mind when glue alone is not stronger than the wood:
End Grain
When glue is applied to end-grain, the grain acts as little straws and draws a lot of the glue up the wood, away from the joint (similar to how the grain draws water up the tree when the tree is alive). In these cases, the majority of the glue is pulled away from the joint and (without more elaborate joinery techniques) a strong joint cannot be achieved, no matter how rough you sand or how tight your clamps are.
Joining with an end-grain face is unavoidable for 90-degree joints, such as when making boxes or drawers. This is why you'll often see dovetail or finger joints used in these cases. These joints not only provide physical limitations to how the wood can move, but also allow the glue to be applied to a greater surface area and along edge-grain faces, creating a much stronger joint.
Joining end-grain faces is also unavoidable for 180-degree joints, and a good round-up of techniques to strengthen this joint can be found at the question, How can I join two boards at the ends?
Wood Movement
There are a lot of factors that determine how a piece of wood reacts to changes in humidity or contact with water. These include the type of wood, its density and shape, the direction of the grain, and its age. Therefore, the two pieces of wood that make up the joint will often react differently to the changing environment, putting unique stresses and tension on the joint. Furthermore, the direction of the tension is often different than what is expected under typical use of the joint.
When significant changes in moisture are anticipated, glued joints can fail as the different pieces of wood react differently to the change in moisture.