It is a nightmare for the patient to regain weight or loose inadequate weight after weight loss surgery but it is a possibility
There are three main reasons by which bariatric surgery leads to weight loss
Nutritional factors – by restriction & mal absorption of food intake

Although bariatric surgery increases the chances of success, it is not an easy way out – all patients should know that their surgery is a tool to help them better control their food intake but they have to comply with post-surgical nutrition recommendations means they have to avoid frequent snacking, have to avoid high caloric food / sweets & fried food etc
On the other hand, there may be very good reasons why certain individuals, despite best efforts, struggle to meet these recommendations.
Remember – surgeons operate on your gut, not on your brain

Anatomical Factors
In some procedures these factors appear with time & causes weight regain like
Sleeve surgery- stomach can dilate so the person consumes bigger portions
Bypass surgery – the stomach pouch can dilate or the connection between stomach pouch & intestine can become bigger & ingested food empties faster from stomach pouch & person feels hungry again so does frequent snacking.

Hormonal factors
People who have regained weight are associated with higher levels of hormone GHRELIN, which increases hunger
There are many changes in levels of gut hormones after bariatric surgery and their individual roles are still poorly understood, it is clear that we will need better understand of these changes & that how these changes may explain why some patients have inappropriate weight loss after surgery or have a greater tendency for weight regain.