So how I would like to begin this is by telling that a persons behavior or the things they do depend very much on how much attention they are getting from their surroundings. Example their friends, family, basically everyone around them.
Before elaborating more on that point I would like to ask how do you think relationships are made, I would say a relationship let it be any relationship friend, family , any relationship you can think of are purely transactional, how you might ask let me take the example of friends , suppose you are friend with someone you both get each others company and also you need someone who has your back at all the time in return you do the same if you think about, it is all just a transaction.
Some might argue that their parents love them selflessly, do you really think that is the case although not consciously but subconsciously they know they will get old and they wont be able to take care of themselves as they are doing right now so they are being nice to you so that when they need you , you help them and more so you carry their name forward and you as a child need protection till you are capable enough to sustain on your own and later you help them because they helped you. If you think about it that is how things are generally.
I guess I have my point clear with this these logics can be applied anywhere and try to think of some examples and think about what you bring to the table and you get in return.
We as humans never help each other unless there is any direct or indirect benefit involved this the first thing you have to accept before moving forward.