The whole idea behind a callback function, is that it is there to implement
asynchronous operations (among which
event observers, which is not the point here, but definitely is for callbacks such as
OnReceivedChat(), for example): some functions (such as
PickAvatar()) just
cannot return a result immediately (synchronously), since they depend on external events (a user input, a server reply to a request sent by the function, etc).
PickAvatar())
cannot wait for the user input (which would
freeze the whole viewer), so it returns immediately and you get the result whenever it arrives, in the
OnPickAvatar() callback.