It's the job of customs and immigration to establish your purpose for visit, and whether you're doing what you say you're doing.
If they have any doubts, questions or are merely curious, they can and will as part of their job, ask you questions. Naturally this should be only about your plans in the country - if they start asking personal, potentially rude questions you could ask to speak to a supervisor.
However, it's simply up to the official on the day to decide if they're happy to let you in (within their guidelines). One official might just be curious why an American is coming to Pakistan. Another might not care at all, and let you through without questions.
As long as you have all your tickets, passport, visa and documentation in order, you might get some questions - but treat it as part of the process and don't worry about it. It happens in almost every country - I once had a long questioning in your country (arrived in Orlando) about what I'd been doing in Colombia - which I'd just visited.
Will it happen next time? Perhaps. Sometimes it just depends - they may have had a briefing that week about a suspected risk from country X, and those X citizens may get questioned more. Mostly it's just a short part of the process, before you enter the country and get to enjoy your visit. :)