The installer probably didn't glue the inside pipe to the "wye" and it and the outside termination fell out. Someone that didn't know what they were dealing with tried to put it back together (outside) and when it didn't want to go back together right figured out if they took the 2" pipe off the "cap" fit back on just fine.
Kind of hard to see down into one of those from outside, try a bore scope. If there is a hub for 2" to fit into from outside, put a new length of 2" and fix the situation.
Use the biggest hammer you like, pounding a square peg into a round hole does not equal a proper fit.