Following.
It is because route (user) you are requesting is from plugin where you dont get data->attributes, and if its “native” route then you have data->attributes structure
Note: I have same situation with my plugin and its annoying that responses dont have same structure.