There are many factors that can contribute to the curling of the fins.
First is genetics, so sometimes their fins will start to curl regardless. Breeders try really hard to breed that out of their bettas.
Secondly is space. If they're in a small container, their fins will curl.
Thirdly is exercise. Flaring helps them exercise their fins since they spread them out. Lack of exercise can contribute to the curling of the fins. You can either show them a mirror for 5-10 minutes every day or so, or in the case where they won't flare at their reflection, show them another betta.