They don't affect gameplay at all. They contain cosmetics that aren't part of the core customization - eg: colored tire smoke, neon underglow. Not only that, you can get 3 boxes from just doing dailies and you get them every time you level up your rep.
How do the loot boxes affect game play? It seems the reviewers aren't a fan of them in this game.
As for the speed cards, you get one every time you win a race and you can replay any race you want as many times as you want.
I have 3 issues with the speed cards - The biggest is that once used, it can never be used on a different car. The second is that there are one or two classes of cards (5 total) that are way better than the others. The third is that cards can drop below your level. This is mitigated somewhat by the fact that its easy to get cards by just replaying races.
I actually like the theory of the card system, but maybe that's because I played Diablo 3 for years and like RNG games in general. Personally, I feel the outrage over the lootboxes is way overblown, the cards have some issues but definitely can be fixed
The actual driving mechanics of the game feel fine by me. But maybe I'm not the best judge of this since I like NFS 2015, and it seems that game was criticized by a lot of people. To be fair though, I'm more drawn to the cusomization aspects of the game and that part of the game is pretty good imo although one thing that really bugs me is that a lot of wheels are much narrower than they should. Like a corvette should have 12" wide rear wheels but most wheels look like 9" or less.