Repairing leaking DWV vertical 3" thin wall PVC
The smaller diameter pipe is because it is specified for in-wall use.  The socket end of a standard 3" PVC pipe coupling is 3.97" which is wider than a 2 x 4 stud wall cavity, which is 3.5".  The 3.25" pipe OD on the in-wall pipe allows for a smaller coupling which can fit inside the wall cavity.

Depending on the size and type of leak, you might have been able to seal it up without having to cut it out.  I put a nail for a picture frame through a drain line once.  To repair it, I scraped some shavings from some scrap PVC, mixed it with a little bit of PVC solvent until it formed a paste and then filled the nail hole with it.  Note, that I would never do this on a pressurized line.