Many socket types and sizes are available with a universal joint between the socket and the ratchet attachment for tightening or loosening fasteners which are not easy to access with the socket wrench plus standard socket arrangement.
Over the years, nearly all manufacturers of quality sockets have introduced convex walls and other similar optimizations to the socket geometry in an effort to minimize such problems.