The embassy is technically American soil, so they can do as they choose.  However, I agree with olympics that the US is treating Pakistan like a colony when it behaves in such a way, knowing Pakistanis are helpless to do anything about it.