Intrinsic in the recognition of rights is mutual interest - if I recognise your interest in not being harmed by not harming you, for example, there is an expectation involved that you will likewise respect my right not to be harmed, and therefore not harm me. That’s how rights work. By the same token, if I choose to ignore your interest in not being harmed and act abusively towards you, I am thus forfeiting my claim on your recognition of my interest in not being harmed, at some time, by you or anyone connected with you.
We tend to recognise others’ interests in as far as that recognition advances our own interests. However in a world of limited resources (finite lives, finite productive lives, finite sexual lives, finite attractiveness, finite material and energy resources etc) and societal hierarchy (which so far has been shown to be unavoidable) we find these concerns inadequate. If being compassionate or following the Golden Rule is costing me more than it is worth, I may ignore it outright or curtail it or restrict it to only those interactions when I am interacting with a stronger or equal party or where an enforcer (law or fear of embarrassment is a motivator) is present. These are just empirical facts. You should see how compassionate nursing staff are in some countries to people of their own ethnic and language group. Of course once a patient-friendly boss appears on the scene their attitude changes.
To claim that rights don’t exist if there isn’t a divine enforcer or dictator is just false - a red herring invented by those who believe they would go on murderous rampages if they didn’t have the chains of religion to bind them and the threat of punishment after death to keep them on the straight and narrow.
Yet secular laws exist and in situations where the law breaks down or strong leadership is lacking we find that people often do go on murderous rampages. (Sometimes we don’t, like in the Touhoku Tsunami in Japan but there other transcendent factors occur such as belief in the nation or the spirit of the nation or similar ethical implications not dependent on pure recognition of others’ interests). We also find that when the authorities are immoral, murderous rampages do follow. Such rampages still occur in North Korea for instance which is an officially atheist nation. They occurred in mostly atheist nations such as Cambodia, USSR, Eastern Europe, PRC and so forth. I would say it was not atheism which made them so but a lack of belief in that divine enforcer. People recognised that the Party or State was the ultimate authority based on the assumption that pure reason (Marx) is the ultimate authority.
The individual human being then becomes disposable and this carries over into day to day interpersonal interactions of the common man.
You should read about the personal lives of party officials in the Eastern bloc, their behaviour was most immoral even when judged by their own standards (such as keeping multiple wives, using government resources for personal gain, in fighting and going against own goals of state/Communism to achieve personal agendas, personal vendettas etc).
Rights exist whilst we have the empathy to behave towards one another in ways that recognise our mutual interests.
Yet we need laws, constitutions, ethics codes (such as the ones used in research) and enforcers (police, courts etc). A government-less Communist utopia has never been able to get off the ground. Empathy is not enough and it can be misdirected or overruled when it is present anyway. We found compassionate, empathetic scientists experimenting on people frequently and breaking ethics standards, hence the requirements for things such as the Helsinki Declaration or university ethics review boards. Most violations are nowadays minor but as any researcher will tell you, ethics boards are a pain in the behind.
Rights are simply an abstraction of the socially necessary behaviours and understandings that long preceded any formalisation or treaty.
Yet rights did not exist for more than half of the world’s population in the 20th century where rulers had absolute authority over the lives of their subjects. In many countries rights still don’t exist and people are still the same people universally.
We also find ethics codes such as the Russian “Thieves in Law” which are codes which rely on societal interaction and recognition of mutual benefit, yet the codes are most immoral to any outside observer. Organised crime in USA, Italy, Japan, South America, etc also comes to mind.