Does how you train your pet affect what stats if gives you as a player? For example; I’ve seen giraffe pets that can give you 14 percent defense, is that common for all giraffe pets, or is it how you train them? (not that I have giraffe pet, but would love one lol) Is it all random, or is there a technique to it?
Pets you buy or get as drops have certain set talents in them, and when you train the pet some of the talents unlock. It doesn't matter how you train. Each time your pet gains a level (teen, adult, ancient, epic, mega) it gets one talent and one derby ability by chance.
To get different talents, you hatch with other pets. So if your giraffe has spritely and life giver, and you hatch with another pet that has spell proof and sharp shot, you might get another giraffe or the other pet, and the new baby might learn any talent from either parent, even ones that were hidden.
It might take a lot of tries to get exactly what you want, but if you keep hatching with pets you like you can make better and better ones.
How you train your pet - what games you play or what you feed your pet - has NO bearing on what your pet will get.
Way back when in the long ago time when pets first were introduced to the game, no one was sure what determined which talents your pet got. Was it the food? Did it matter if it was eating only food that it liked?
Turns out, not so much. Today we know that what your pet gets is determined the second your pet is hatched - nothing you can do can affect what is already pre-determined.
That means that when you are training a first generation pet, what you get is completely random. Each first gen pet only has 10 possible talents (and 10 possible Derby Abilities), but you cannot know what will manifest.
When you start hatching pets, however, now you can start to affect what your pet will manifest. You can never know 100% what it will get - even mixing two identical pets that have all the same talents and abilities doesn't mean you will get all 5 of each to manifest. Your ODDS are better, but you can still manifest abilities that neither parent manifested.
Bottom line, a pet can be hatched to have any talent or ability in the game, but what will manifest is determined at birth, not by what games you play or what snacks you feed it.