Rats come for the food primarily, but also materials for bedding, warmth, water and a place to lay their babies.
I keep my feed in a metal garbage can.
If you end up needing to use traps, I suggest the electric traps, which provide instantaneous death.