Why does Hawaii have its motto?

Hawaii's motto (Ua Mau ke Ea o ka ʻĀina i ka Pono) dates back to when Hawaii was not part of the United States, however, it has been kept as all other states have mottos for example California's is 'Eureka' and New York's is 'Excelsior'