@JoneillI've put the question on Coral List, the largest collection of coral researchers/experts on-line. I'll let you know what they say. I suspect that just telling you what I learned maybe 20 years ago will not satisfy you.
See Chapter One, especially pages 20-24, of https://wwfeu.awsassets.panda.org/downloads/climate_change___coral_triangle___full_report.pdf.
My claim of the Coral Triangle being the "origin of corals" is better stated as the "center of biodiversity," according to this reference. And it would argue there is no good answer as to where they came from in the first place. It is all wrapped up in plate tectonics and untestable hypotheses.