Technically, both are correct; and both mean the same thing…
However, it is usually said as knowing right from wrong… I have rarely, if ever heard anyone say it the other way round.
This could be something to do with cadence rhythm, although please don’t quote me on that part!!!
Basically, if you listen to the ticking of a clock; our brains are wired to hear it as “tick” and “tock” ~ you’ll never hear it as tock tick right?
In actual fact, it isn’t tick tock or indeed tock tick; but rather just the single “tick” ~ our brains naturally perceive this as tick and then tock! Cool right?