GBS test

Jeanne • First Glow Baby born 7/31/16. Expecting #2 in March 2018.
I had my GBS swab today, and it was next to nothing, when compared to a normal pelvic exam, so that was a nice surprise. 
What I'm wondering is: why do they test so early? I'm 35w1d, and theoretically, couldn't my test come up negative now but I could still be positive in 5 weeks, right? Purely curious if anyone knows the logic here - I didn't think to ask at my appointment.