The stem connects the steerer tube of the fork to the handlebars. While it's a small piece, the stem cannot be overlooked. A stem's drop, rise, and length will all affect how a mountain bike handles.
In the mountain biking world, stems are a point of some controversy between the bike fitters and the aggressive bike handlers. Many bike fitters view the stem as a cockpit component that allows them to achieve perfect fit on the mountain bike. However, bike skills coaches and aggressive riders claim that the stem is a handling-related component and not a fit-related component. Most riders that are concerned with fit generally run rather long stems, while most riders who are concerned with handling generally run shorter stems.