They explain it fully in the article that you didn’t bother to read.
Actually they do, heart attacks tend to be preceded by respiratory infection, flu shots help prevent those, thus reducing heart attacks.
Which still leaves the old situation of if you don’t get the flu you don’t need the shot. Because it won’t stop people who already don’t get the flu (and subsequent infections) from having non-infection related hear attacks.