Your story is really strange and your takeaway is the exact opposite of what it should be.
Alice just jumped to the conclusion that Bob was a criminal? How is that okay? The answer to your story isn't for Bob to reveal potentially embarrassing personal information in a job interview but for Alice not to assume that everyone with a gap in their resume is a criminal.