Period stinks

Why does my period blood smell bad sometimes and sometimes it doesn't?