Actually, it was the other way around. The rule was a provision of a law passed in 1869 that, for the first time, legalized gambling in the state of Nevada (Las Vegas as a city did not exist until 1905). This law, passed as Assembly Bill 78 on March 4 of that year (with 29 Yeas and 7 Nays), was titled "An Act to restrict gaming" and reversed the provisions of the territorial bill of 1861, which had declared gambling a felony. Gov. Henry Blasdel, Nevada’s first governor after statehood, voiced his opposition to the proposed new act in the strongest of terms: "I know of no greater vice than gambling. It is against public morals. It saps the very foundations of society. It induces intemperance. It begets idleness. It fosters immorality. It multiplies crime. It leads to reckless extravagance … In short, it is the root of all evils." But his attempted veto was thoroughly quashed.
The new act required the purchase of a license by anyone dealing "any game of faro, monte, roulette, lansquenet, rouge-et-noir, rondo, keno, fantan, twenty-one, red-white-and-blue, red-and-black or diana, percentage or stud-horse poker, or any banking or percentage game, played with cards, dice, or any other device" for any form of money, credit, or equivalent.
In a vague effort to appease opponents like Blasdel, and to give gambling an air of propriety and respectability, the act contained a clause relating to the exclusion of minors (those aged 17 and under) from licensed premises, while Section 7 dictated that gambling activities should not be on public display. Specifically, "The licensee shall not carry on his game in any front room on the first or ground floor of any building."
Evidently, some ambiguity surrounded what legally constituted a first or ground floor, particularly in properties located on slopes (such as Virginia City, which was the main population center of Nevada at that time) where a room that could be viewed and entered from street level might technically be located above a lower ground floor. So in 1877, the law was amended to remove any conceivable loopholes and prohibited gambling "in any room of the first floor or story of any building; and when any building has two first floors or stories, the other being or fronting on one street and the other being or fronting on another street, then and in such case no license shall issue to carry on any said games in any room on or in either of said first floors or stories of such building."
Not until a further amendment in 1905 was the restriction lifted, allowing that, "The licensee may carry on his game in any room or rooms on the first or ground floor or on the second or third floors of any building." But this newfound freedom was short-lived: In response to a wave of anti-gambling sentiment led by the Women’s Civic League and the Anti-Gambling League, in 1910 gambling (which by then had expanded to include craps, klondyke, poker, whist, bridge whist, five hundred, solo, frog, and slot machines) was once again outlawed altogether. It remained (mostly) illegal until 1931, when the "wide-open" gambling law passed the Nevada Legislature and most forms of gambling have been legal ever since.