The name refers to the Earl of Sandwich who lived 1718 to 1792. The British have always been betting and gambling buffs. It's in accordance with their idea of sports and sportsmanship - basically a British philosophy.
But the Earl of Sandwich overdid it even by British standards. During his gambling days, taking meals was considered by him as highly unwelcome interruptions. He therefore invented a kind of meal not requiring him to exchange the gambling table for the dinning table: sandwiches.