A bathroom fan MUST be vented to the exterior of the building to avoid moisture-related issues. This is often completed with a wall, soffit or roof cap. When possible, I choose to vent my fans out ...
Not necessarily. If the bathroom is in a lower floor or the basement, it's easier to vent the fan through a side wall. In such cases, a wall-mount fan usually makes more sense than a ceiling-mount.