The ‘default’ behaviour is that it remembers its previous state over restart. However if there’s a database error during the restart process it can’t, so defaults to off. Setting initial: ensures that it is always on.
It’s more if when you’ve restarted it didn’t finish writing to the database than a proper error. If there’s nothing in your logs about failure of the database it’s fine.
I sometimes get ‘found unfinished session’ which is directly linked to when I restart and the service ends up being killed by systemctl. Those are the times when it won’t ‘remember’ automation states and a few other things.