Unopened canned sardines behaving strangely but not expired
The expiration date is (as it were) a red herring. Food doesn't suddenly go off on the expiration date. Most foods are just fine well past the expiration date; it's just the the manufacturer isn't willing to guarantee it any longer.

And all bets are off if something happened to the can. It might be hard to tell if a can of sardines was compromised. It would require only a pinhole, and sardines are usually packaged with weak spots in the can.

In your case it sounds as if the can was probably fine, since fish tends to go off in ways that are really, really obvious.

It could simply be that this is a different batch of fish. The name "sardine" applies to several different species, living in a variety of environments. That will affect the flavor. 

There are many other variables as well: how they were harvested, how they were stored, how they were processed. Any of these could lead to different flavors.

If you didn't like it, you should return the can to the store. They will likely give you a refund, and push the information up the chain to the manufacturer. They're usually pretty good about that: they really, really hate it when people get food poisoning from products they sell. And it's far cheaper to give refunds to the few people who complain than to fight with a lot of customers over $3 worth of canned fish.