Could be a multitude of things and could easily have had a problem when you got it. It does look under weight* so one possibililty is internal or intestinal parasites.
*A fish with healthy wieght will have a smooth line from it's face, over it's head onto it's back. An under weight fish will have a pinched back behind it's head showing the outline of the it's skull where it joins it's back. An overweight fish will often store excess fat on it's back showing a hump that makes the outline of it's skull distinguishable from it's back.