I bought Cod fish on Sunday afternoon and cooked it Tuesday night.... It was a little chewy, was that because it was bad?
Cod tends to be fairly firm as compared to other white fish (tilapia, etc.) though it can vary a bit in texture depending on the variety.  White fish in general will also tend to overcook fairly easily and will lose moisture quickly.

Typically recipes that specify cooking times "per side" mean top and bottom - i.e. you flip the food over rather than cooking on 4 sides.  That would mean cooking for about a total of 4 minutes which sounds right to me for cod, rather than your 7 total minutes.  That's enough of a margin to result in overcooked fish.

2 days is just about the maximum for safe storage per our generally recommended guidelines (assuming you stored it properly wrapped and refrigerated) but Whole Foods does pretty well with rotating their stock, so it's not especially likely that the fish was significantly older than that.  If you didn't notice any sliminess, offensive or fishy  odor, or other outright signs of spoilage, you are likely safe.  In any case, this sort of decline probably wouldn't cause a change in texture - you'd notice the effect more in the flavor.

Now, unfortunately, since you've already consumed the fish, you might discover for yourself whether it had gone bad, but I think that's unlikely.  The most likely culprit is that it was moderately overcooked.