Why do asparagine and glutamine have two different abbreviations?
The abbreviation Asx (B) is used if it is uncertain whether the amino acid at a given position in a peptide sequence is Asparagine or Aspartate. Similarly, Glx (Z) is used when there is uncertainty between Glutamine / Glutamate. 

These two pairs of amino acids can be ambiguous in peptide sequences because Asp/Asn and Glu/Gln differs only by a terminal amide (-NH2) group in the side chain, and this amide group can be spontaneously lost from proteins by a deamidation reaction. When this occurs, asparagine is converted to aspartate/isoaspartate, and glutamine to glutamate/glutamate. These cannot be distinguished from "real" aspartate or glutamate by classic peptide sequencing, nor by mass spectrometry, since their mass is identical. Hence, protein sequences obtained directly from protein frequently contains Asx/Glx entries.