I think the important idea here is that it was against *Pakistani* “law” (and in particular, against the wishes of Pakistani authorities) for regular Americans to travel to Pakistan at the time, not that it was necessarily against US State Dept rules for Aericans to do so. Hope this helps.
What is your source for the statement that it was against Pakistani law for U.S. citizens to enter?