Learning-by-doing or habit formation?