I am aware of this previous related question Alternative to "Isn't it true that...?" when questioning witnesses
The most upvoted answer to that question gave alternative ways of speaking. My question is about why the, "Did you not ..., " and "Is it not true ..." formula came about in the first place and whether it has some specific justification or advantage.
I am currently watching a TV-recorded trial from the USA.
The prosecutor consistently asks questions such as, "Is it not true that on February 14th, you [performed some action]? or "Did you not say that ..."
It seems to me that answering Yes or No to such a question gives the same logical meaning, e.g.
Did you not say that Humpty Dumpty was an egg? Please answer Yes or No.
The answer could be "Yes (you are correct that I did not say that)" or "No (I did not say that)."
Is this form merely traditional or is there some legal or psychological logic that makes the question somehow more effective than the straight versions as, "Did you say that Humpty Dumpty was an egg?"