According to the UPC, it must go through the roof independent of other drains. If it doesn't, chances are that the rapidly moving air can pull the trap on a toilet or other fixture. The pump moves water very quickly, which must be replaced by incoming air, the resultant pressure drop in the stack can cause problems. Yes, I've watched it happen on an improperly-vented sump.