There's no why this happen in real life unless your crystal is out of spec... let's say 4Khz instead of 4Mhz ... or you have a bunch of latency before your PORT initialisation. If they are located at the top of your code, few mSec could be the worst delay (Brow out detect, Power up timer...)

on a Sim, ROFL, everything is possible so far.