but I'm wondering how this gets registered?
Look at the source code of the MvcModule.cs
and your question will be immediately answered:
this.Kernel.Bind<HttpContext>().ToMethod(ctx => HttpContext.Current).InTransientScope();
this.Kernel.Bind<HttpContextBase>().ToMethod(ctx => new HttpContextWrapper(HttpContext.Current)).InTransientScope();