Basilica is actually an very odd word with a strange history that shows how a word can change in usage and meaning as it shifts from one language to another.
Basilica derives from greek and is an adjective meaning royal
Now there was a building in Athens called the Basilike Stoa used as a law court by the King Archon and this function is a distant echo of the time when Athen had kings and Kings were Judges.
It is believed this is the source of a Latin word.
Vitruvius a few centuries later refers to basilicas as buildings in the centre of cities that functioned as public halls used for business and law courts.
Yet Roman basilicas generally had their colonnades INSIDE and not along one side of a building or porch HOWEVER Roman era Basilicas often occupy the same position next to a forum as a stoa did in the agoras of Greek and Hellenistic polises.
Yet why use a Greek loan word when a Latin equivalent was available?
I suspect some of the Hellenistic Greek or Hellenized Asian monarchs were building basilike stoa of their own but adapted to local climate traditions?
Perhap Roman architect studying in Greek and Asia Minor brought back the idea to Rome and then it spread back to the province and basilicas begun replacing the stoa ?
In a final twist Basilicas once again became Kingly Houses for a different kind of King that of heaven when Christians took over basilicas for churches and then the word became associated with large churches and bishops.
From House to Public Hall back to House!