Its one of the basics of the rules of the game. +1 to AB and AC for every size category difference bigger between your and enemy.
You are an elf so medium
They are dire rat so small
This is also the source of people's frustrations when trying to kill grave scarabs, except even more so since they are tiny, the category smaller than small.