It is because the image formed in the mirror is laterally inverted. So, right becomes left and left becomes right. However, some capital letters appear the same in the mirror because they have the same left and right sides. For example, A will look the same in the mirror but B will be reversed as the left and right sides of B are different from each other.