The ejector pump handles the wastewater from your basement, including sewage from any basement bathroom.
While a sump pump has a simple drain pipe to expel the water to the outside, an ejector pump is connected directly to your sewer or septic line and also has a vent pipe to manage the removal of sewer gases.
Pumps may discharge to the sanitary sewer in older installations. Once considered acceptable, this practice may now violate the plumbing code or municipal bylaws, because it can overwhelm the municipal sewage treatment system. Municipalities urge homeowners to disconnect and reroute sump pump discharge away from municipal sewage treatment systems.