>If they had simply booted her back across the border
They can't. And this is entirely her fault for trying to enter through Mexico. Telling them she will return to Canada isn't helpful because what are they supposed to do? Tell her ok, go get an Uber to the Airport and just let her go? Mexico would not issue her a VISA either so her only option is US or Mexican Detention. When the agent said "You aren't a criminal" is when she saw that Mexico had denied her re-entry and she was flagged for detention.
Now, I mean, personally I think it would be fine to just let her go because who really cares, but the point of rules/laws/procedures is for them to be followed.
Why did she go to Mexico first? Because she was denied entry in Canada and thought there would be less scrutiny at the Southern Border for Canadians. She was correct, because it worked the first time when she would have likely been denied at the Canadian border for her second crossing, but her initial denial flagged her.
I feel for her, and the situation sucks, but she 100% knows she's trying to game the system, and that's not even bringing up the issues of her self-sponsored TN visa which is dubious.