They look for patterns of behavior. Specifically how recent your negative behavior patterns are. Drug user 5 years ago but have been clean (without any indication otherwise) so long as there are no other negatives (debt beyond your means, domestic violence, etc) you’ll be fine. The more negative behaviors you’ve maintained, the more in the past it has to be.