Madara wasn't expecting it, so he wasn't trying to sense.
No different than when Pain managed to sneak up on Jiraiya/Fukasaku/Shima despite their ability to sense.
except limbo should've seen him coming close
OT: plot.......
Dunno but it was foreshadowed though. When he was a kid he told Hashirama to not sneak up behind him, he got stabbed in the back by Hashirama, and then this.