Bieber comes from a world where his egocentrism is rewarded. Everyone piles attention on him, so to his mind, his comments about Anne Frank are a compliment - he sees qualities in her that he sees in his followers, but rather than show respect for something like Frank's legacy, he made it all about himself. It's the same with the Diana comments; he's the one who created the dangerous situation, but to his mind, the paparazzo is responsible because he started it.
It's just egocentrism taken to an extreme, the kind frequently found in teenage celebrities who are coming of age, and are trying to hold onto everything that gives them a sense of identity and acceptance when they are unable to resist the inevitability of biology as they physically mature. The problem Bieber faces is that his fans grow out of his music, and as he gets older, he is less able to connect with the people entering that demographic. So he takes any attention that he can get as a substitute for the attention that he wants or is used to.