Bernadotte always made an attempt to ingratiate himself with the enlisted men and. Command is not a popularity contest, and being popular is not a prerequisite of a good commander.
Davout was respected by his troops, which is much more important than popularity, and was also scrupulously honest and incorruptible-something Bernadotte could not claim. Davout had a strong character and always did his duty. Bernadotte was an enemy of his superiors. Further, Davout's nickname, 'The Just' was given to him by his troops. And Davout supported his officers if they had acted in accordance with his instructions and orders. Davout epitomized what a good commander was supposed to be; Bernadotte was not and that is proven by his performance, or lack thereof, from 1806-1809.
Instead of trying to be popular, Davout always ensured that his troops were well-trained, well-led, as well as well-fed, -clothed, and taken care of in the military sense of the term. That won him the respect and trust of his troops which is vital if a commander is to be effective.
And if the story is accurate Bernadotte was shot at under a flag of truce by a French sentry. When he was asked why he shot at Bernadotte (then the new crown prince of Sweden), the sentry replied that he was merely trying to apprehend a French deserter. You can't fault the sentry's logic...