The difference here is that when a function is hoisted, its body is also hoisted. Compared to when a var is hoisted, only its declaration gets hoisted but not its assignment.
A brief review of Scoping and Hoisting in JavaScript
Tiago Romero Garcia
1K6

Many people explained the difference between these two but not how it worked internally. This is the first article which I found that explains exactly why this happens. Cheers mate!