It should be based on the principles of immunology to understand this phenomenon: the immune system produces antibodies against an antigen that it does not possess
The AB group contains the A and B antigens on the red blood cells, so it can not produce anti-A antibodies or anti-B antibodies since it already possesses antigen A and B (otherwise it will develop autoimmunity).