Question: I recently got my US visa and I am really happy about it. Also, I recently saw a documentary where a US immigration officer was denying entry to some people. I never thought your entry could be denied if your visa was valid.

What are common reasons for US immigration officers to deny entry in the country?

Answer: 
A visa is not a right to enter a country. Citizenship is that.

When you enter a country, two things happen.

* An **immigration** officer speaks to you as you enter.
* The **customs** service looks at your stuff.

Those people have access to all your data in the computer, so they know all about your visa application. **If the conversation or your stuff suggests an intent contrary to law or your visa conditions**, that could lead to a refusal. For instance, on a UK border-patrol TV show, someone's luggage was found to be full of business clothing and 20 copies of the person's CV. That was *prima-facie* evidence of "seeking employment", not allowed on their visa or [VWP](https://en.wikipedia.org/wiki/Visa_Waiver_Program), so back they went.

So it is possible to have a valid visa, and then "put your foot in your mouth" at the entry interview, or be seen bringing in something foolish. For instance, it's a lousy time to try to smuggle cigarettes - people still do that, and still get turned away. (Trust me: they have cigarettes in stores here.) What makes it smuggling is "not declaring it" - declaring it greatly improves consequences for honest ordinary mistakes.

Because America is a *federal* country, this can blind-side people since we have a cacophony of differing government laws. Many states are simpatico with marijuana use, but it's a Class 1 narcotic to the feds. So drug paraphernalia or the smell of pot will doom you, even if it's legal in the state you are landing. (This is *especially* a problem at the Canada border.)

Speaking of that, border guards can prohibit things that are legal in both places - Canada won't *let in* marijuana and paraphernalia, even though it's legal in Washington state, and legal federally in Canada. A laptop full of porn is a problem here.

Note that they can also inspect your phone and your social media activity both for contrary-to-visa activities and simply being undesirable... and if you say "well, I won't give them my passcode!" they will simply refuse you entry. So data hygiene is a good plan... also, not being a jackass on social media they know about.
A visa is just something that you need to enter the US. The visa does not indicate any decision to let you enter. It just allows you to be present for a decision to be made!

The visa is needed so that someone can make the decision: it's a necessary but insufficient part of the process. The actual decision is made each and every time by at the CBP post where you enter the US. Typical reasons for denying entry include:

* attempt to contravene immigration laws, e.g. applying for a tourist stay and then unauthorized employment, or giving reasons to suspect that such may be attempted in the future,
* prior actions in contravention of immigration laws, e.g. overstaying the entry permit duration without extension or advising someone how to "cheat" on a visa application; In other words: consequences of helping others skirt/break the law are at least as bad as doing it yourself is,
* prior criminal charges and/or judgments, whether in the US territories or outside,
* determination that there are grounds to believe that the entry of the individual is contrary to the interests of the US (or sometimes also its allies),

etc.

Note that the initial authorized duration of stay is tangential to any dates on the visa. It has everything to do with the decision made at the port of entry. The CBP officer will write in your passport and/or on your entry card how long you're authorized to stay. This may be shorter than what you expect in certain cases. E.g. just because the visa allows a stays of a certain duration, that's the upper limit. The actual length of stay authorized is determined on a case-by-case basis each time one enters the country, and an authorization may be denied as well of course. Say, a B1/B2 visa has a maximum length of stay of 6 months. I've seen people get permission to stay for 2-4 weeks if it was determined that that's all they need for their scheduled activity within the country (say a conference/symposium). At the same time, lying about what you want to do is just as bad and is grounds for refusal of entry, so don't try to "pad things". If you don't know how long it may take, or if you have potential extensions to your plans, just say so. You may be asked to provide some documentation that you have the means to afford your stay, or are otherwise financially supported, in any case.

And the flipside: just because someone's visa is expired doesn't mean they are not authorized to stay in the US. An immigration status may be adjusted without any physical visa being added to the passport, but other documents will substantiate such claims, e.g. a decision to extend or to adjust an immigration status. Such decisions are of course not awarded willy-nilly - there are copious regulations around that.