Chekhov was employed as a physician, but he was also a writer. He was most prolific as a writer when he was in his twenties. It was at this time that he was in medical school and trying to help support his family, so he wrote a ton of stuff--from captions for cartoons in newspapers to short stories and plays.
"The Bet" was published in 1889 when Chekhov was starting to get popular. Critics were getting kind of irritated with him because most of his writing had no real political stance. The truth of the matter was that Chekhov was really just irritated with philosophy and politics and sought refuge on a remote island called Sakhalin. He journeyed to Sakhalin to avoid urban life (sounds like what the lawyer in "The Bet" ends up doing, right?) in 1890.
It's safe to say that Chekhov's feelings at the time that "The Bet" was published are a lot like the feelings that the lawyer presents in the short story. Both Chekhov and the lawyer find value in experience and think that the aspects of modern life (including making money) are pretty banal.