Yca (us) = edg (ua)
What probably happened is that UA offered an EDG on that route that is the same as US's YCA. When your fare mapped over to UA, UA "corrected" it to its government fare. Had you flown your YCA on US metal, UA wouldn't have known anything other than US reported a Y, so you get your Y.
For what it's worth - unless the rules have changed recently (which is certainly possible) - domestic codeshares on YCA fares haven't been allowed for a while. You may have gotten lucky with that particular route's routing rules or maybe someone forced the fare, but for most routes I've seen the contract carrier's fare rules specifically require flying their metal domestically. I wonder if the booking system you used saw the US/UA codeshare number as USExpress instead of UA? Just a thought.