Motile bacteria are known to accumulate at surfaces, eventually leading to changes in bacterial motility and biofilm formation. We use a novel two-color, three-dimensional Lagrangian tracking technique to follow simultaneously the body and the flagella of a wild-type Escherichia coli. We observe long surface residence times and surface escape corresponding mostly to immediately antecedent tumbling. A motility model accounting for a large behavioral variability in run-time duration reproduces all experimental findings and gives new insights into surface trapping efficiency.