Here is the real story. Ali was hated by the majority of Americans after the time he objected the draft. He already was hated by most for his boasting, the first sports star that made trash talking part of his game. He did it from the start.
But he had charisma that TV loved and Howard Cosell, another egotistical self-promoter played it perfect to latch on the Ali. It was not just marketing that made his legend though. It was the comebacks and brutal fights between Frazier and Foreman viewed by nearly everyone that
won him over to the majority (whites) who eventually recognized the heart and courage behind the mouth.
In the late 1960's the black power movement was pushed to prominent black athletes by outsiders like the USC sociologist Edwards (the man behind the black power salute at Mexico City). It was a major movement.
Ali joined in and converted to Islam like Kareem Abdul-Jabbar, Ahmad Rahshaad and a lot of African-American athletes right after, and had that as a rationale to object to serving his country in a conflict that had no ramification to defending his country.
He likely was recruited heavily by Elijah Muhammad, the leader of the Black Muslim movement. I'm sure Ali identified with the movement and if you aren't a black person who grew up in the 1950's in the south you might not understand the the pull that this would have on a big ego who could see his sports career making a bigger impact on social change.
Jesse Owens was the one black sports hero still at that time who for a while rejected the movement and was looked at by that generation as an old Uncle Tom. He later wrote a book about changing his views. It was called "I Was Wrong".
Was Muhammad Ali the greatest boxer of all time? No. If you research the sport there are plenty of others that were easily arguable better. Joe Louis, Roberto Duran, Sugar Ray Leanord, Sugar Ray Robinson, Willy Pep are all legends at different times and weight divisions.
Ali was the biggest name and most famous boxer the world has ever cared about at the time when TV still was 3 channels and everybody watched.
Before internet, maybe at the beginning of satellite cable. Imagine poor people in third world countries like Haiti, Jamaica, or Zaire in those days all knowing one name who called himself The Greatest.
I read a book recently about Haile Gebresaillase titled "The Greatest." I still agree with that even over Bekele. He's still my vote for the greatest distance runner in history.
I don't think "The Greatest" referring to Ali means educated fans think he was the best ever. He was something different and bigger.
Kind of like Elvis Presley. He might not have been the best ever but he is The King.