They can be flawless, but you are statistically never going to get flawless without RNG. They are as random as a captured wild Pokemon's IVs would be.
When the game generates mystery gift Pokemon, it checks the PID field from the card itself.
PID=0 (unseen, shiny possible) We'll disregard this.
PID=1 (regular Dynamic, no shiny)
PID=/= 0 or 1 => Static
So PID can either be Static or Dynamic.
Static:
Loads the Static PID, (consuming 4 from the RNG seed [normally used for method 1/J/K Pokemon]), and then it takes that same advanced RNG seed to create the IVs.
Dynamic:
Generates a new PID from the Timer and another value (consuming 4 from the RNG seed [normally used for method 1/J/K Pokemon]), and then it takes that advanced RNG seed to create the IVs. As you can see these are two different processes for the creation of PID and IVs, but don't expect the Dynamic PID to be 'random' to change the IVs willy nilly.
Basically you can have any IVs, but a dynamic/static PID. Head over to Smogon to learn what RNG is, it's too complex to explain in this thread.