I have searched a lot about this topic, but couldn't get a perfect answer. Why is anonymity is important in blockchain if the transactions are legit, What are the core reasons for importance of anonymity in blockchain?
I think this is really a question about data protection rights.
But the transfer of personal and financial information through digital channels raises an important question: How much of your personal data is protected and kept private?
Europe set a precedent for consumer privacy protections in 2018 with the passage of the General Data Protection Regulation (GDPR). This sweeping privacy law expanded consumer control over data access and use, including the right to request that personal data be destroyed by the agency collecting it.
In short, many people do not want it to be made public how much money they have saved up or the details of products and services they purchase.
To take an extreme example, a person who has been raped may not want their financial transactions to reveal to their neighbours, their employers and busybodies around the world that they received rape counselling, medical treatment from a venereal diseases clinic and other paid for services relating to the event.
Even most ordinary people leading ordinary lives, who never purchase legal but taboo or controversial products, like to keep their finances and purchasing history private. Anonymity is part of that privacy.
The creator of Bitcoin used the pseudonym Satoshi Nakamoto and took great care when registering the bitcoin.org domain to avoid that being used to identify them. Privacy and anonymity were obviously of great importance to them.
Your question boils down to why privacy is important if you aren't doing anything wrong (not-"legit"). I'll only answer in the scope of Bitcoin, but there's a more principled answer to the broader question.
First, the Bitcoin protocol allows any transaction into the blockchain so long as the inputs are properly unlocked and the outputs are validly formed and do not sum to greater than the inputs. A few other rules apply, but basically, any mathematically valid transaction is "legit" vis-a-vis the blockchain.
This definition of legit is quite different from a legal definition. Many mathematically valid transactions are considered illicit by financial and legal authorities.
As a universally open protocol, Bitcoin does not enforce these legal or financial definitions, which vary greatly by jurisdiction. Therefore, there are likely transactions being executed on the Bitcoin blockchain which are illegal in some areas.
Without anonymity, many people would be unable to use Bitcoin due to local laws.
Second, there are social/security problems with having one's full balance and financial history publicly available and tied to one's identity. Bitcoin would be unattractive to most people if it was easily discoverable how much coin you had, a list of anyone who has ever sent to you, and a list of anyone to whom you ever sent money.
Thirdly, anonymity makes Bitcoin more resilient against censorship and state-level attacks. Early on, there were few Bitcoiners. If their identities were publicly known, governments or other groups could have targeted those individuals and de facto shut the project down. Or today, they could compile a list and punish/tax/jail all current holders of bitcoin. Bitcoin is designed as a safe haven against the harms of legacy financial systems: inflation, censorship, taxation, and confiscation.