It's because you're setting the variables to strings/text instead of numbers. If you remove the quotes from the numbers, it works as you expect:
set TestVar1 to 100
set TestVar2 to 30
if TestVar1 is less than TestVar2 then
return "TestVar1 is less than TestVar2"
else
return "TestVar1 is more than TestVar2"
end if
@kreal, to add to this, the comparison you originally asked AppleScript to make—being a comparison between two strings—was telling you, not whether the number 100 is less than 30, but whether "100" comes before "30" alphabetically, which it does.