It was a tough conversation at times, with a freewheeling debate about the law, regulation, and economics—the kind of conversation Airbnb CEO Brian Chesky and his cofounders are going to be having nonstop, around the world, for years to come.

But they don't have to travel far to understand the problem.

We admit we felt a bit churlish when we pointed out what we'd learned just a few hours earlier: The Airbnb house in which the trio were hosting us for dinner was completely unlicensed for the purpose.

By the book, the owners should have at least gotten a business license and a conditional-use permit.

They'd done neither, city officials told us—even though they implicitly promised Airbnb, by agreeing to its terms of service, that they had. They are far from alone.

Chapter 41a of San Francisco's Administrative Code is crystal-clear on this: Renting a room, apartment, or house for less than 30 days means you're operating a hotel.

For that, you need a conditional-use permit. Violating the law could mean fines of up to $1,000 a day.

You do not have to wade through arcane bureaucracy to find out whether or not a given Airbnb listing is legal in San Francisco. The city's Planning Department has an online Property Information Map which lets you see all the permits issued for a given property.

That's how we checked the house where the dinner was held.

Airbnb cofounder Joe Gebbia is an active host, renting a room in his loft apartment. We also looked up his location on the map. We couldn't find a conditional-use permit allowing anyone to operate a hotel at that address.

Airbnb notes that many of its rentals are for longer terms than the usual hotel stay. That doesn't help matters. If you go more than 30 days, you're a landlord—and that's all kind of fun in San Francisco.

Chesky said over dinner that his company was having "a conversation" with local officials, primarily in San Francisco and New York, two big markets for Airbnb. But as his company expands around the world, its regulatory compliance issues just get more and more complex.

There are no easy answers for Airbnb. Hosts promise Airbnb that they have the right to rent out their places. But a lot of them simply don't. Some renters are violating terms of their leases—like a friend of ours, who just got a cease-and-desist letter from her landlord. Some are flouting local regulations—like the owners of the house we had dinner in.

We met the owners briefly at the start of the evening—they didn't join the dinner, so we didn't get a chance to ask them about how they felt about local regulations. We don't think any significant number of Airbnb hosts are deliberate scofflaws: More likely, they just didn't realize what they were getting into.

Chesky estimated that Airbnb's operating in 22,000 distinct municipalities around the globe, all with their own rules.

In its early years, Airbnb was so small it could fly under the radar. Now, with 10 million nights booked, it's got to get serious about grappling with its public-policy issues.

We think it's getting there. San Francisco has organized a task force to look at "collaborative consumption," Airbnb's preferred buzzword for the kind of small-scale, personal commerce it enables. (Services like RelayRides, which lets people rent cars to strangers, also fall under this broader category.)

It is also commissioning an economic-impact study to see if Airbnb can show that it's better for local economies than, say, big hotels—an argument the company has made anecdotally, but without numbers to back it up.

San Francisco is trying to enforce hotel taxes on Airbnb—but hey, it has a handy Internet page where hosts can pay them, so that's okay, right?

Airbnb's clearly popular. And it's crazy to expect a homeowner to comply with the same regulatory regime as a 400-room chain hotel. But it's also crazy to think that we're not going to end up having some kind of rules about renting your home to strangers.