I like to imagine them frienemies and only act friendly "on camera".
Plus when they have to work together against common foe (for example against Bowser + Eggman combo in 3DS London 2012 Story Mode).
Kinda like Goku and Vegeta when they have to beat Freeza, Cell, Buu, etc.