Why Indian ocean has named after a country?

Because India was the nearest significant country when the ocean was named.