Something to remember is that optifast is a doctor supervised diet. We do not recommend users to go under 1200 calories without doctor supervision or at least a diet that was created by medical professionals (like medifast).
Meal replacement shakes are one way that people reduce their calories. There isn't a magic to it but some people find it as a way that they are able to easily track calories and lose weight. You can also do meal replacement shakes at a higher calorie level, like those that are well in normal weight loss range (1200-1800 for females, slightly higher for males).
It depends if you want to replace a meal with a lower calorie meal replacement or not. Some people would rather just eat lower calorie meals than drink shakes. Other people find shakes useful.
You can't out-exercise poor eating habits.