Until 2010 the building also housed the Central Criminal Court, but it wasn't called "Five Courts" then because it actually gets it's name from the four courts of Chancery, King's Bench, Exchequer and Common Pleas which it originally housed from it's completion in 1796 until 1877.
Inns Quay likewise is not named for a bunch of taverns, as you might expect, but instead for "The Honorable Society of King's Inns" - the institution which controls the entry of barristers-at-law into the justice system of Ireland, so it's been a place of law and justice in Dublin since that was founded in 1541.