Why is a mouth swab used to collect my DNA?

Saliva does not contain DNA but the cells inside your mouth do.  The cells inside your cheeks are constantly falling off into your saliva in large numbers.  These cells have nuclei with your DNA.  Your white blood cells also have DNA but swabbing the inside of your mouth is easier than using a needle to draw blood so it is also less painful.