Luck has a lot to do with it, sure, but we're (thankfully) a bit more advanced than just hoping someone is looking through a telescope at the right place/time.
NASA's Center for Near Earth Object Studies does a lot of neat work related to this. For example, Sentry [1], the NEOWISE mission [2], etc.