NieR: Automata's world is inhabited by androids and machines that destroyed almost all the humanity in the world. As robots, YoRHa's androids are not allowed to have feelings for other androids or machines, as their only purpose in life can be synthesized with their «Glory to Mankind» motto.
Although, even if 2B, 9S, and A2 all are YoRHa androids, and they are supposed not to feel any type of emotions and yet be all the same, this is not the case. In fact, they all have their own personalities and, in some cases, they have emotions, as players can discover when playing NieR: Automata.
Why NieR: Automata Is Still Groundbreaking 5 Years Later
In NieR: Automata, 2B is the main character on Route A. She is a YoRHa android designed to fight the machine lifeforms that have invaded the planet on behalf of the survivors. During the 14th Machine War, she served as a soldier. 2B is a silently determined blade. As a combat android, she discourages idle chit-chat about trivial matters and is generally reserved around others. In addition, unlike her partner, she has high regard for the chain of command and rarely questions her superiors' orders. However, in the face of certain situations, 2B exhibits a notably sardonic wit and can even be hot-headed.
Deep down, 2B is a lovely person. She adores her friends, petting her Pod as if it were a pet and even going so far as to find a flower picture for Operator 60. She is also very considerate of others' wishes; when she and 9S are searching for the memories of an android with amnesia by visiting various locations, 9S wonders what's so special about them. 2B simply states that the memories are important to her, which is all that is important. Furthermore, despite her professional demeanor, 2B
Read more on gamerant.com