It's most likely a software error in whatever compass app you're using. Try a different one. If it's a native iPad app it'll probably be resolved in the next update. Mine seems to work fine though.
Check to see if it is set for true north or magnetic north.
Is it wifi only ipad? I didn't think the compass worked for it.
You wouldn't happen to be using a case with a bunch of magnets on it? 🙄
In all seriousness if you have a smart case it will knock off your compass by more than you would think I was supprised when I noticed it on mine dropped the cover off and watched the compass realign put it back on and watch it move off again