It’s supposed to help reduce clotting, and thus help a bit to prevent a heart attack, at least that’s what I understood from my heart doctor. Generally you’d take the 81mg “baby aspirins” for this, not a full adult dose.
After a heart procedure my doctor told me to take the 81mg daily for the rest of my life. It’s been about 20 years now, with no side effects that I know of.