Becuase they were at war with the nazis
Afghanistan became an independent state when Amanullah established an alliance and signed a treaty of friendship with the Soviet Union. Hope this helps if you have any questions please feel free to message me;)