The head of the CDC is Robert Redfield, who was appointed by Trump (a fact left out of the Wikipedia page, for some reason) in March of 2018. He is a noted virologist, but like many of Trump's appointees was not chosen from the public sector. His background is almost entirely in clinical research in the private sector or the military, and thus he has little experience with public administration, epidemiology, or public health more generally. It's reasonable to assume that his appointment was politically motivated: while he is an established expert in the study and treatment of HIV/AIDS, he is lionized by Christian conservatives for openly holding that the best defense against the transmission of HIV is sexual abstinence before marriage, instead of practical tactics like providing free condoms, and maintained close ties with anti-gay and anti-HIV activists up until the time of his appointment to the CDC.
The idea that Trump inherited a 'broken' CDC is hard to justify considering that his own appointed head was in power for nearly two years before COVID-19 arrived on the scene. What seems more likely is that Redfield — though perhaps an adequate leader for the CDC in normal times — was unprepared and ill-equipped to lead the center through a burgeoning crisis. While there is no way currently to know what happened in internal CDC discussions and communications with the White House — that will require Freedom of Information requests for documents, assuming that the White House doesn't decide to classify them and hide them away — it is safe to make a couple of assumptions.
First, it's apparent that Redfield was doing what he knew how to do, not what his position called for. Redfield is a clinician and academic researcher who spent his life developing tests and vaccines for viral infections. The slow creation and distribution of tests in the US is due in large measure to the fact that Redfield decided the CDC would develop it's own test, a more expansive test that would detect a wide range of SARS-like illnesses, not just the coronavirus behind COVID-19. This developed test proved to have clinical flaws and had to be reworked, adding to the delay in distribution. A more experienced public health official would likely have abandoned this research-driven approach for something more practical and rapid, such as the testing kits already available in other nations.
Second, as an overtly political appointee, we can assume that Redfield was inclined to follow the White House narrative on the disease, unlike more seasoned epidemiologists (like Dr Fauci) who would be inclined stand up against such narratives and cling to scientific facts and projections. Since Trump's narrative through most of February and March minimized the dangers and impact of COVID-19, it's understandable that Redfield might have resisted the urge to rock the political boat by stepping up production of testing kits or ensuring that private-sector companies had the FDA clearance to do so on their own. Redfield's inexperience with the functioning of government bureaucracy may have led him to miss or underestimate the complexity of coordinating this kind of massive undertaking.
We can choose whether we want to place the blame for this failure with Redfield as the direct CDC leader or with Trump as the person who appointed him to office. I suppose we could even place it with Alex Azar, the Secretary of Heath and Human Services, whose job it would be to act as a bridge between the White House and the CDC. But in any case, the responsibility falls squarely on an administration that prizes political favors over competence and experience.
For parts of this, I drew on this Politco article from February 26, early in the spread of the pandemic.