Is there a comprehensive manual/book where I can understand the inner workings of Motion? Despite its quirks, I think a whole lot powerful stuff can be created with it.
Unfortunately, no — not that I know of. There is a level of documentation that addresses *most* user's needs. There was a time when trainers were "Apple Certified", but still only trained at the levels of Apple's documentation. There are things in Motion I'm not even sure Apple programmers are aware of (and as an ex-programmer, I can tell you that definitely happens!)
I can tell you that what you see in the UI is not all that is there. By that I mean that you can only see up to 4 decimal places (which Motion "rounds" automatically for viewing), but I can assure you that Motion maintains 14 decimal place accuracy. You can use a Numbers generator to see up to 10 decimal places (or if you scale the Value by 1000, you can see all the significant digits.) [The so-called "experts", like Simon Ubsdell, don't even know this. I've seen a video of his where he basically "writes off" using extra decimal precision simply because Motion rounds those visible values... he doesn't know...!]
Some values you see look like one kind of format, but will actually exist as some other format. For instance, the Twirl Filter > Twirl parameter looks like it's in degrees — the value even has the degrees symbol (º) by it, but if you link up the Twirl default value (180º) with a Numbers generator and take a look at its Value, you will see 31.4159265359 which is ... strange. It's obviously π*10. I figure that Motion keeps data like this behind the scenes to maintain increased precision — there is, however, no documentation regarding any of this... so it's just a guess.
The best way to find out what's going on is to explore! Keep an open mind and try to rationalize what it is you're actually seeing! (And, figuring out how you can manipulate it to serve your purposes!)
I've been using Motion for a little over 17 years and I'm still finding out new things about it.