I hope somebody will find my explanation useful m(_ _)m
This might be confusing for English speakers, as English spelling is pretty messed up anyway ("moon" instead of "muun", "little" instead of "littel", "mine" instead of "main", and no end in sight), but I believe spelling should follow speaking as close as possible. In Japanese せんぱい is pronounced "sempai", even though it's written with an "ん". "ん" before "p/b" is pronounced as "m". "ん" isn't equal to "n", it's equal to "n/m". The Latin alphabet is more precise than kana in this case, so why throw away that extra precision? What is the point in teaching English readers the wrong pronunciation for a word, only to follow an easier transcription? I also don't get why people write "desu" instead of "des", even though the "u" is hardly recognizable.
@lw123789 I can understand your feeling, I know that most people just write senpai, so many English readers got used to it.
@yetsun >ん is clearly a n sound not an M sound. I'm sorry, but this is incorrect.