I've been lubing locks for years. It keeps them from freezing in the winter and they all function well.
Lubes don't "attract" dirt, but whatever dirt that gets in there can stick to it.
Thats what I meant. instead of moving on when the grit gets in there, it sticks.