How does a Git merge commit know which is the “real” parent?

As I understand it, Git figures out the current state of a repository by tracing back the changes from the current HEAD through its parents to the root.

Merge commits have two parents, like C6 here:

Merge commit example from git-scm book

[source]

I understand the advantages, rationale, etc. for having multiple parents like this.

However, I don’t understand how you could trace back through the history here. If your head is on the tip of the master branch, and you trace back one commit at a time, how does Git know that C6‘s “real” parent is C5? Is it just something like the order they’re stored in the commit file?

Or am I misunderstanding something? Is this not what Git does at all?

Git Baby is a git and github fan, let's start git clone.