Some compatibilities are reasonable, like Houndoom learning Dark Pulse, which is a good STAB that it can't get otherwise. Others seem completely random, like how Cryognal can learn Attract but it will always fail when used.
It's just GameFreak Logic. And some GameFreak Logic is weird, trust me.
Go through a movelist and equip it to the Pokemon based on type and origin (though I don't understand how you can Surf on most Normal Types...)
Or use their own Logic, in which makes some good (and bad) results,
Source: Movesets and the comments above, because WHYNAUT my brain is failing on me.