If I'm paying a professional by the hour, yes, it matters if he can do it in one hour rather than two.
I once hired a civil engineer to do a job for me, and he started billing me for time spent learning how to do it. I refused to pay him. (There was nothing unusual about the job, it was a simple repair task.)
That's a tricky one that I find myself pondering a lot as a contractor.
I've ultimately decided that if it's something I'm required to learn for this specific task then I'm billing for the time spent doing that. But if it's something that I figure I should know as a person being hired to do a task in this particular domain then I won't bill for it.
To me it's the difference between hiring a mechanic to 'rebuild an engine' and 'rebuild a rare X764-DB-23 model of an exotic engine.'
It's reasonable to expect a mechanic to know how to rebuild an engine but it isn't necessarily reasonable to expect a mechanic to know how to rebuild that particular engine and therefore it's reasonable for that mechanic to charge you for their time spent learning the nuances and details of that particular engine by reading the manual, watching youtube tear down videos, or searching /r/mechanic/ on Reddit for commentary about that specific video.
It's important to strike a balance between these kinds of things as a contractor. You don't want to undervalue your time and you don't want to charge unreasonable rates.