Azathioprine interferes with the synthesis of DNA, RNA, and proteins in rapidly dividing cells like immune cells. By doing so, it helps to control excessive immune responses that can cause damage to the body. This mechanism is particularly beneficial in treating autoimmune diseases where the immune system mistakenly attacks healthy tissues.