Firstly, it prevents the water in the vertical pump pressure line from flowing back to the wastewater pump. And on the other hand, it can happen that the municipal sewers are overloaded due to heavy rainfall.
It can happen that the water from the sewer line is forced back into the house. The non-return valve prevents water from escaping from the sewage pump and thus avoids damage to the property.