Rats look for shelter, food and water. If they find what they need (nesting places, compost heap, sewers, food leftovers, holes, garbage bins) they will most likely stay.