It comes from the French word "buffet," which refers to a sideboard or a side table. In the 17th century, this evolved to describe a type of meal served on a side table, where guests would stand and help themselves.
Over time, the term "buffet" became associated with the style of serving food, rather than the furniture itself.