I think there’s a problem with the logic that’s being used here:
It’s checking stats for any users who were created after the beginning of the previous month. So if a user joined in mid June, it will be checking stats from the beginning of May up until mid June. The badge is then has its created_at
date set to the end of the previous month (May 31). This would allow a user who was created in June to have their New User of the Month badge awarded at the end of May.