At my airline there is no requirement for pilot to stand by the cockpit door as passengers deplane, but most of us do it anyway as that is a good customer relations. Plus that way you sometime gets good feedbacks from passengers whether they enjoyed the flight or not.
I get asked questions all the time when I am walking through the airport terminal or even when I am eating my meals at airport eateries. Try to smile and answer politely even when they dumb questions like where is the restroom when there is a sign right next to them as they are asking you that.