Why are you searching a year or more back? Is this using git blame?
Why does the code fence against a particular circumstance you didn't think should be possible? Why does it call out to something you think is unrelated? Those questions can be answered by a proper commit message.
You _could_ tag every line of code with
// JIRA-123 The PM wants this to be blue
but if you did it would become unreadable and wouldn't be kept up to date. JIRA: #1234
Adjusted the FOOBAR parameter from 42 to 73.
To know the "why", you have to read the ticket; you will not find anything in the git log.