I think there are two separate issues here.
First, it's clear that the child should have been treated as an unaccompanied minor. That is UA's policy, and I've seen it enforced.
Second, beyond that, it seems like this is a case of having a seatmate you'd rather not have. That's life. UA allows children; specifically UM's. When you buy your UA ticket you know it's a possibility that you will be seated next to a UM whose parent is not on the flight, or is in a different cabin. The OP does not have to be happy about it, and certainly could have asked the FA to facilitate a seat swap, but sometimes you just gotta live with it. Like sitting next to an adult who cuts his toenails during the flight. The joys of flying commercial.