This is a good question that Isayama has answered so subtly in his manga.
First and foremost,
Bertholdt, Reiner and Annie come from a 'ghetto' neighborhood of Marley, where Eldians are put to reside. There is a lot of blatant racism in the nation of Marley, especially towards Eldians. Eldians do not have the same rights as Marleyans, and the operate as a inferior race. However Marleyans know the power of Eldians, thus Marleyans are using the titan powers by guilt-feeding Eldians into joining the army and serving the nation of Marley. The guilt is based on the Marleyan theory that Eldians in the past used their titan powers and committed war crimes towards Marleyans.
Which means that for
kids raised in these 'ghettos' such as Reiner, or Bertholdt, are brainwashed this idea that only serving the Marleyan army will give Eldians their acknowledgement, and hopefully pay for the crimes that their Eldian ancestors did in the past.
Reiner and Bertholdt are part of those kids who excel their training in order to have 'the honor' of becoming a titan shifter.
After being assigned a mission to invade
the walls, Reiner and Bertholdt initially had this idea of wiping out every human inside the walls, kidnapping the Coordinator Titan power, and returning to their homeland.
after living there for quite a few years, Reiner saw that Eldians within the walls were not evil as they were portrayed by the Marleyan government. On the contrary, Reiner befriended other survey corps members, and a lot of them were depending on him. So he became more sympathetic and understandable towards the people inside the walls.
Which led to Reiner
facing his ultimate dilemma: is he a "soldier" (aka survey corps), or a "warrior" (aka Marleyan spy)?
And this is the beauty of Isayama's story-telling. We learn both perspectives, and that makes us understand both protagonists and antagonists. To quote Bertrand Russell War does not determine who is right, only who is left
Additional information showed on manga chapter 93. This is another hint why Reiner behaved in such a way. He has been feeling guilt and his position in this war has not been clear to him. Source: mangastream.com