Why is a rat called a rodent?

Because rats are part of the small mamal family which are called rodents.