When the Jews who’d been comforting Mary in the house noticed that she’d gotten up quickly and gone out, they followed her. They thought she was going to the tomb to mourn there.
When Jesus saw her crying, and he also saw the Jews who’d come along with her crying, it made him angry and distressed that death caused so much sorrow.