OK so I have two theories when it comes to Moriarty.
Firstly someone else posted that they think he really is Richard brook and Moriarty is using him as a pawn just like the people he strapped bombs to. Also when they were at the pool, 'Moriarty leaves through one door and comes out another and says I'm changeable meaning that someone else is telling him what to do.
My other theory is that he has a twin brother, not too sure how likely this is to be true but that's the only thing I can see plausible if my first theory is wrong because you clearly see him shoot himself with blood all over the ground