Why Do Moments of Mindlessness Occur?
In short, the five hindrances disrupt mindfulness. 

https://en.m.wikipedia.org/wiki/Five_hindrances

Also related to the five hindrances are the general defilements (kilesas), which also hinders mindfulness. 


  I am also wondering whether merely paying close attention to lapses in attentiveness and to distracted moments can ultimately lead to the elimination of such habitual behaviours.


It’s a good start. However, one needs to purposely commit to the entire eightfold noble path in order to completely eliminate those behaviors.