Both the liver and the kidneys are involved in "cleaning" our blood. But why we have one liver and two kidneys? I can just as well imagine that we have two livers and one kidney. Is this just a coincidence?
Your organs can be grouped into two categories.
The digestive tract organs, which are singular.
These form from the endoderm.
The liver and pancreases are all direct outgrowths from the digestive tract which is again singular.
Everything else which comes in pairs.
These form from the mesoderm or ectoderm.
Even the brain and heart are paired organs, the heart starts as two organs and fused during embryonic development. The whole circulatory system starts perfectly paired, (embryonically and evolutionarily) but then specific parts close off to create the complex circulatory system of "higher" animals so we can have a high pressure section and low pressure section.
The spine is also sort of singular but is basically the the line splitting the left from right half of the body. Everything that branches off the spine does so in pairs.
The real questions is why you have two lungs and one spleen. They are the only organs that breaks the rules. The lungs are an outgrowth of the digestive tract and the endoderm, but is paired. The spleen is part of the circulatory system, but singular. Now the most primitive lungs are singular, it split later likely as animals got larger and needed more lung capacity and also needed a tight connection with circulatory system (paired). The spleen is the weird one, and likely harkens all the way back to before vertebrates existed, it predates the closed circulatory system, and develops on the midline of the body just like the spine and digestive organs. Just like how the spine is the midline dividing the nervous system into pairs the spleen divides the circulatory system into pairs.
Although most people have two kidneys, some have only one kidney. We can live with only one kidney. Infact, there are some animals still only have one kidney such as single-kidney rats. Many people are born with only one and we don't need two kidneys. One healthy kidney can work as well as two.
A pair of Kidneys evolved in humans as bilateral symmetry in vertebrates by evolutionary modifications of the nephridia. During embryological development, the organs are that fall outside the bilateral symmetry are singular (which includes the digestive tract organs as mentioned by @John). But if you notice, liver also has two lobes.