I'm wondering why, at the end of Full Metal Alchemist: Brotherhood, Edward was able to choose what he would sacrifice to bring back Al. When they tried to bring back their mother, I thought that Al's body and Ed's leg were just randomly taken from them by Truth. Same with Mustang, I don't think he chose to sacrifice his eyesight, it was just taken from him forcefully. So how was it that this time Edward was given a choice?
Edward was not given a choice. He made a choice.
With the case of transmuting their mother, the ingredients and the blood they offered was not worth enough to get their mother's soul back. There was no equivalent exchange. Thus, the alchemy rebounded on them. This is why what was lost was random.
In the case of getting Alphonse back, Edward went to the Truth with the intention of giving up his gate (his alchemy) in exchange for Alphonse. The exchange was equivalent, so that's what happened. No rebound, no random loss of body members.
It should also be noted that many of the rebound losses do not actually seem random. Izumi and Mustang's losses are laced with irony. Izumi is unable to have a child after having her organs messed up, and Mustang (who had a "vision" for the country) is blinded. To my recollection, both characters comment on the irony.
To add onto what Shaymin Gratitude answered, even Ed's and Al's losses are laced with irony, as pointed out by father. Ed lost the only family he still had and the leg on which he stood and Al was condemned to a cold metal body that could not feel the warmth of love when he wanted to feel his mother's embrace again.
I actually have a hypothesis on why Ed's arm was taken from him. He says Truth can take his leg, his arm, or his heart in exchange for his brother (in this case, his brother's soul). I think when Truth took Ed's arm, Truth was trying to give him a hint at the answer. Right after Ed loses his leg, he gains the ability to transmute without a circle. Immediately after, he gives something else up for his brother and Truth takes his arm, thus taking away his ability (in that moment) to perform transmutations with his bare hands in exchange for his brother. I think Truth, who it perhaps pitied since he and his brother were literal children, was trying to help Ed understand the lesson Ed learns by the end. That he can't fix everything with alchemy. It just took a few years for Ed to figure it out.