That's all Larian, I'm afraid to say. You are correct - the game does not know what it wants to be, and for Larian's own design part, the concept of immersion in story and space was, at the outset, a fairly alien concept to them, and one they still don't really grasp fully - so they often seem to feel that they can have their serious story line, and their silly 4th-wall breaking antics and ridiculousness, without realising that injecting the latter everywhere actively disrupts and spoils the former. On top of that, their story writing has never been very good to begin with, and they seem to have a philosophy that plot holes, non-sequiturs and disconnected nonsense lacking overall coherency can all be covered up and ignored if you make it bombastic and over-the-top enough, which they earnestly attempt to do.