What was the main purpose of cocacola?

it was originally made to cure head aches because it had cafeen