Currently the test is primarily for Tuberculosis (I-693). Once you arrive you are still responsible for your own healthcare costs because America doesn't have socialized medicine. Further, no medical exams are required for tourist visas, and many folks such as myself have lived in America for almost a decade, and still have to submit to asinine medical examinations. If I had Ebola everyone around me would have died many times over in the literally ten years I've lived here without an immigration-type medical exam.
The USA has a socialized healthcare system, it's called Medicaid and expanding it was a big part of the Affordable Care Act. In some states, such as California, Medi-Cal (the state's name for Medicaid) is fully available to legal immigrants and practically fully available to illegal aliens as well, the latter just have to use the emergency department rather than schedule a physician's appointment.
Our system does however assume that highly capable persons such as yourself are able to not only able to afford medical care, but also to pay for the socialized programs for those who can't.
Ebola is not transmitted as easily as you seem to believe. It is much less contagious than many other disease, but it is a lot more deadly once contracted.