Aspirin prevents the blood in the body from clotting, and because stroke and heart attack are both caused by the formation of blood clots in the body, anything that prevents blood clotting from forming would be expected to have a beneficial effect in those diseases.
Our study found that aspirin treatment was associated with a 24 percent reduction in the risk of the most common type of stroke in women and a 32 percent reduction in heart attacks in men.
In women, aspirin prevents strokes and doesn't have any real effect on heart attack, and in men aspirin prevents heart attacks but has no effect on the prevention of strokes. So there appears to be a gender-based difference in the beneficial effect of aspirin.