you earned those Diplo favour penalties.
The logic is that you should liberate it not keep it, if you want the DF.
It doesn't matter how one empire acquired other ones capitol. The fact that they did should give diplo penalty.
Imagine if for instance people of Bratislava decide to be Austria and flip. Slovakian Government would not be impressed
So imagine this sItuation, you go to war with a civilization in ancient time, before warmonguer penalties apply, take and raze all their cities but the capital, no major repercussions. Then make peace with them, and eventually the capital and final city then wants to join your empire.
Yes... the non existent empire that just wanted to join you, now happy citizens of your own empire now also hate you forever affecting all future diplomatic relations with any civ in the millennia to come for helping them... and this is not a fringe scenario, this and simmilar nonsensical situations is how the mechanic comes into play
Im sure in the WC, two thousand years later, all world leaders will say: "Is ok your killed millions, that is old and forgotten, we dont care, but allowing these guys to peacefully join you two thousand years ago... no way. In the name of the ancestors of your own citizens, that belonged to a civilization long time forgotten that peacefully joined you, your civilization will be not be allowed to vote anymore, you monster."
Yes of course makes total sense... and Im pretty sure Australia, US, Spain, Italy, Peru, Brazil, Colombia, Mexico, UK, Germany, France and all the hundreds of world nations that are in the land of old empires and civilizations that do not exist anymore have these kind of diplomatic problems too... And Im also sure the UN is expecting US to return New Echota to the Cherokee nation before returning the apropiate diplomatic power...
Are you seriously trying to defend this as a logical diplomatic relation? The reasons you argue with, may mean that a civ should have grievances against the owner of the flipped capital. But this does not represent what the mechanic actually does at all. This is called strawmanning, and is totally irrelevant to the problems with the mechanic. Which are that these diplomatic penalties for warmongering apply before diplomacy and warmongering, equal peaceful flipping with military conquest, for eternity, and for offenses against non existent civilizations. These are the problems that none of the supporters of the mechanic have been able to defend so far.
The way to improve diplomacy in a game that took all these factors into account is not to add a new major mechanic that ignores them in single player to try to balance a multiplayer only issue.
Civ6 devs taking these kind of decissions is why I dont play or care about the game anymore, and people of the community supporting them is why I dont take this community seriously anymore as well.