I agree that luck played a role.  The shot is thought to be effective about 60 to 90 % of the time, depending on the circulating flu strains that are prevalent in a given year.  And the shot is most effective for healthy people between the ages of about 7 and 65.  The shot is not perfect (no vaccine is 100 % effective) but it is much better than nothing, which is why Health Canada recommends it for everyone older than 6 months of age.