Regular STI testing necessary?

Allison
Why is it necessary to get tests for STIs every few months if you're with the same partner? Am I just dumb in thinking the only way you can get one is through sex?