In Gen 7 specifically, the egg RNG is a bit weird. I believe the stats themselves are only written down in memory once the Egg is generated, but the RNG method it uses is extremely predictable, to the point where you can reset before receiving an egg, switch out one of the parents, and the egg will generate with the same values even as a new species. People exploited this with "shiny swapping," where they would breed Magikarp (the fastest-hatching Pokemon) until getting a shiny, then reset, swap out with their desired target, then they'd know exactly how many eggs it'd take to get a shiny without having to hatch everything in between.