In answer to Dave Kopel's bleg below, there are as far as I am aware no international legal restrictions to crews resisting pirates. A ship is governed by the laws of the flag state, and the relevant regulations would come from there.
However, the crew has no incentive to resist. The crews are not military personnel. They are just working on a ship for a living, and not getting paid much. They would not risk their lives to save the insurers/owners some money. This is exactly what pirates bank on. In the age of sail this was also the case: merchant crews almost never resisted, and thus there was little occasion for the pirates to be violent.
Nor do shipowners want their crews to resist. Shooting could result in the loss of the ship, a massive financial blow. The payments to pirates are minor in the big scheme of things (in comparison) and more easily dealt with on an actuarial basis. My understanding is that insurers insist crews be unarmed.
The resistance by the crew of the Alabama was extraordinary and unusual. I would love to know why they did it. It may be linked to the vessel being a government-chartered ship; this voyage was not about making money. Or maybe its that Southern spirit.