One of the reasons most dieting fails is because people lack a healthy, sustainable diet baseline. Of course, a big part of that is people not having any idea what their baseline is to begin with… if they even have one.
This is also a key reason modern people insidiously gain weight over time. Their metabolism slowing with age and decreased activity certainly doesn’t help. But a lack of consistency and healthy eating habits is the larger contributor.