A hatchback is defined mainly by its rear access: the rear door lifts with the glass to open a luggage area connected to the passenger cabin. A conventional luxury sedan usually has a separate trunk and emphasizes refinement, comfort, materials, and equipment. One term describes a body layout; the other combines a body style with a premium market position.
That distinction leaves room for overlap. A hatchback can have a quiet, richly equipped cabin, while a luxury sedan may offer folding seats and useful luggage space. Some premium cars with sedan-like profiles use a liftback. Compare the actual opening, passenger space, ride, and ownership requirements rather than treating practicality and luxury as opposites.