When we get tired, distracted or try to multitask beyond our capacity, we go into autopilot to cope. This might result in riding to work but realizing you did not remember anything about the ride or how you actually got to work. Or might result in forgetting small details such as forgetting your keys, forgetting to turn the stove off in the morning, forgetting your wallet at home...
Possible solutions:
-change your habit: Your old habits will kick in when you switch on autopilot. Do the same habit each and every time. As stated above, when I carry my hard bags I circle my bike to ensure I do not forget something. Yes, it looks strange but it works.
-link one routine to your next routine: Let's assume you need a key/ID badge to get into your building at work. Connect your bike keys to your building key. When you forget your bike key and try to enter the building you will quickly realize you do not have your building key and will go back to your bike, thereby forcing you to remove your keys from your bike.
We will never be able to defeat our autopilot and it is much too useful to not use. The next best thing to do is acknowledge it and make systemic changes to accommodate it.