They did gain something, though it cost them a bit more. See while the materials were enough in theory to remake a human body, it might not have been enough to construct it. So it took their bodies to help with the construction.
What you gotta remember is they did get what they wanted. Their mother, at least in the 2003 version. In Brotherhood, it's never revealed who it was they really brought back. So in either case, they did gain the body they tried to revive. In the '03 version, Alphonse did not gain anything because he lost his body, so Edward was the one to gain from the transmutation, and when he transmutated his leg, he gained back Al's soul, since it was still being taken by the gate. Maybe souls take longer to breakdown, so he was able to pull it back, and anchor it to the armor. So, that's what Ed gained for that transmutation.
In Brotherhood, it's the same, the boys did get something from the human transmutation, but in this case, they got two things each. The creature from the chemicals they'd used, and the Truth. But what they learned, probably can't be measured in what they gave up. Since Alphonse was so young and eager to grow up, that could be why he lost his body. And since Edward was so proud of his Alchemy that he'd stand against life to gain back his mother, he lost his leg, and maybe to be ironic, the truth took the last of his family since he opposed Trisha's death so much. (those were just my thoughts there) In the end, both boys received the Truth as recompense for their bodies being lost, but it's hard to say if Al gained more or not, since you can't really measure what he lost in measure to what he gained, which he didn't really get until later on.
Or maybe everything I said sounds like nonsense, either way, hoped this helped.