When traveling abroad, you will find that many countries have laws that would surprise you. Going topless anywhere in Fiji is illegal. You might be tempted to buy turtles, birds and plants from the street vendors in Brazil, but buying these items is against the law. A little gambling in Indonesia after a trek? Not possible. Gambling will get you arrested. Chewing gum in Singapore is illegal unless it has therapeutic value.
Embassies and consulates can provide only limited assistance to citizens arrested in a foreign country. Make it a point to not only know the activities and top sight seeing spots of your travel destination, but also find out about the local culture and laws. Simple research upfront could save you fines and jail time later.