Canada's border service sent her back to the US. At that point, the US can't exactly tell her to go back to Canada, and have her walk back and forth until the problem solves itself.
Immigration detention pending a return to the country of origin seems reasonable at that point. 10 days of detention to figure out transportation to the country of origin doesn't seem reasonable though.