Weigh ins are done the day before, in order to fight you have to meet the weight for the class, with a 1 pound margin of error. So if the weight class is 205, you can get away with 206. Fighters have access to the scale leading up to the weigh in, and will "cut weight" before it to get down to that weight.
Cutting weight largely involves getting water out of your system by sweating. So fighters typically look more "ripped" durring the weigh in. Once they weigh in, and make the weight they are not weighed again before the fight. So they rehydrate putting back on whatever weight they cut, which can be up to 20-30 lbs in extreme cases.
Is it fair? I don't know, but I can't think of a better idea. Doing wiegh ins right before the fight would make things worse IMO, then if a fighter needs to cut to make weight he can't rehydrate before the fight starts. Even losing a few pounds that way immediately before a fight could decrease performance.
Plus different guys carry there weight differently, no 100% fair way to do it, but the current method is probably as close as we can get.