The function GetDefaults is not very useful; when it returns true, the ajax call is still in progress. If you put an alert, say
alert( $('body').data('n') ), just after the single statement in the success callback, here is what will happen:
1. You will see an alert with "undefined", then
2. You will see another alert with the correct value "123"
Why? That's because your ajax call is asynchronous - the setting async has a default value of true. What that means is that when you make an ajax call JS continues to do other things as the ajax call get's made; JS does not 'sit around' waiting for a response from the ajax call.
Therefore, return true and alert(x) get executed before $("body").data("n","123").