Period after MC

Erin

How do the apps guess when you will start your period after a mc? I’m so confused on how all this works.