If I’m reading it correctly, the law you cited only applies to non-citizens of the US, so if a citizen posted themselves to return home they wouldn’t be in violation. This was a case of a UK citizen (attempting) returning to the UK, so the equivalent law wouldn’t apply.