There are a few reasons for the UK's high death rate, or to be more precise, England's death rate. (Scotland and Wales have done much better.) One is that the care homes were not protected. It was obvious to anyone who knows anything at all about the care sector that it was likely to be vulnerable. Care staff are low paid and often work in more than one care home, or work in a care home and also have other jobs. Being low paid and possibly on zero hours contracts, they don't get sick pay and may have come into work when they shouldn't. Once the virus is in a care home, it's very difficult to stop it spreading. I think this accounts for about 20,000 of the deaths.
We do have a more unequal society than Japan. Poverty and poor housing helped the spread and poor health and poor diet will increase the death rate.
Finally, any figures for number of cases based on tests done is not accurate and doesn't reflect the true number of people who have had the virus. I personally know 14 people who have had covid and only a couple of them had a test. Assuming this is typical, you can multiply the official number by at least 10.
In fact I prefer to work the other way around. I believe the death rate for covid-19 is around 1%. Total UK deaths currently stands at approx 45,500 (this figure is likely to be accurate), which means that approx 4.5 million people have had covid. This is roughly between 6-7% of the population. Way too low for herd immunity but it matches Oxford University's estimate of 6.3% based on sampling and testing for antibodies.