Python has been around since early 90s and it’s main implementation was written in C though. It’s always had first class support for writing C extensions so it’s not illogical that wrapping functions written in other languages interface with it by targeting that C API.