Getting a game for the cheapest price you can find isn't something wrong, we do it all the time. Getting a game from G2A, etc isn't "wrong" either, but when something like this happens you can't blame Ubi for it (and rest assured, things like this WILL happen, just look at the Sniper Elite 3 launch, a lot of illegitimate keys were revoked). You took a risk and paid for it, if the reseller covers the price for the item you lost, good for you, if they don't, well, I guess that next time you will probably skip them when looking for a cheap price.
Then there's the moral issue, sites like G2A, Kinguin and countless others deal with keys that may or may not be stolen. I personally don't buy from them because of that, buying a key that may be stolen is close to pirating a game (and the stuff about paying for items doesn't exactly apply here. In Argentina we have brick and mortar shops that sell pirated copies of games and people who pay for those are still pirates, I'm sure you will all agree to that)
If the money you paid goes to the dev then there's no problem with looking for the cheapest price you can find. If you aren't sure about that then I wouldn't bother. You know that games go on sale all the time anyway, so instead of playing it today you might end up playing in a month, not a big deal, I'd say.
Of course that's all just my opinion, not the TRUTH (tm)