Generally, all cells are manufactured as flat tops, and the ones offered as button tops have the button placed on afterwards (before they get wrapped, during the point in the process where the PCB would be added, if they are protected). This is why you even see some of the same
batteries offered each way.
As for why, there are several reasons. One of the most common is that it is a simple way to design something to be reverse battery protected without a chip to sense it. As I understand it, this is why the Provari needs button tops.
Same idea for flashlights. Mostly, it is just a design decision. Many mechs will take both button or flat tops.