Extract adversary's secret input in simulation based security proofs

I am trying to understand the simulation-based security proofs (as well as the UC framework), I find that there is a basic assumption when proving the security, i.e., the simulator could extract the secret input of corrupted parties, even if the corrupted parties' input is encrypted or in secret shared form. I have two questions:

1. Is there any additional requirement or restriction along with this assumption?
2. Why can/should we rely on this assumption? Currently, I only focus on the semi-honest setting.

Any advice and explanation would be highly appreciated. Thanks.

• Thanks a lot. I can understand deterministic function in semi honest model, but not for the probabilistic function. Consider two parties to convert a threshold homomorphic ciphertext Enc(x) into two shares. Ideally, the input is Enc(x) and keys, the output is two shares $x_1, x_2$. In the real world, each party has a local random share and use homomorphic properties to do the conversion. Actually, the simulator can easily make the view and output distribution indistinguishable from the real view. But does it need to also make sure the simulated outputs $x_1', x_2'$ satisfy $x_1' + x_2' = x$? – WYC Apr 3 '20 at 12:49