Anakin was de aged, to a 7/8 year old. Rex was charged with looking after him, which is easier than expected given the "horror stories" about young Ani that the other jedi had told him. In fact, he notices that Ani is terrified of him but tries not to show it. Ani even lets Rex pick him up! It turns out his general was a slave, and he think he's his owner and doesn't dare to protest to anything Rex would do. Rex is horrified and has no idea what to do about this.
Sad thing is Rex probably came down pretty hard on him at first in an attempt to curb the worst of the horror-story behaviors while they were in an active war-front. He needs the kid to know he’s serious because there’s a lot of really bad trouble Anakin can get himself in that could lead to his own serious injury, death, or capture. And Anakin just very quickly nods along and agrees because he’s scared out of his fucking mind, in a foreign place and with a new foreign owner and he has been taught that the best thing to do is just keep his head down and behave.
And Rex is probably pretty proud of himself at the fact Anakin’s behaving so well. It wasn’t so hard after all. He probably just chalks the fear up to incredibly foreign situation and the fact that Rex, okay, did sort of scare the crap out of him in getting him to understand the rules.
Then Rex finds out about Anakin’s past.I feel like Obi Wan’s the reason it gets found out - he finally catches up to the group and gently quizzes Anakin to try and figure out, you know, what in the hells happened and how to fix it - he asks Anakin what’s the last thing he remembers and Anakin says some moment from his childhood and then says that Rex is his new Master. Rex points out that he couldn’t be seeing he’s not a Jedi and Obi Wan just calmly goes “he doesn’t mean Jedi Master” and it just clicks. And he feels pretty terrible.
Then I feel like Anakin ends up being spoiled by like ALL THE CLONES because, look, they have their own unspoken issues about their lives and the fact they’re basically property in the eyes of most of the Republic but that is very much their issue, not something for their General to have had to deal with. And they feel like shit for making him feel like he was still stuck in that position while being with them. So they’re making up for that screw-up as well as… trying to make-up for a childhood of slavery. Also they’re now like uber-pissed whenever they run into slavers again.