At almost every level officers and officials have the ability to exercise discretion in their enforcement of the law. What happened to this lady was likely within the confines of the law but was it justice?
I think in this particular case, it's really hard for an immigration officer to do something nicer: she's been denied entry on either side of a land crossing due to obviously admitting to planning to or having already worked.
At an international airport, there's a large transit area where someone can dwell until they find a departing option.