Bottom line: Almost everything sold in the United States is well regulated and the regulations are enforced. Failure to follow these regulations will result in fines, loss of business, and potentially lawsuits or jail time. You're safe eating almost anything that's being sold from a fixed or semi-fixed establishment.
The cheapest 'foods' in the US are heavily processed foods: your sugary/salty snacks. The quality control and hygienic standards are very high because the FDA/CDC/USDA/FSIS/State agancies (yes, at least four entities are involved in the regulation of food) would fine them for violating the standards and, perhaps more importantly, they would have to deal with negative publicity, an expensive recall, and possibly a lawsuit if the food was not up to hygienic standards. It's also just wrong to sell food that might make people ill.
Street foods and Local Restaurants
With regards to 'street foods'. The hygenic standards for these establishments are typically set and enforced at a local level. These standards are typically very high as well: nobody wants a fine, a bad reputation, or a lawsuit. There's enough competition and information moves so easily that one incident could put a food seller out of business.
The foods usually sold on the street are prepared/cooked beforehand in a kitchen and then maintained until they are sold or expire. In many foreign countries you will have unregulated/poorly regulated raw ingredients prepared in front of you. That does not happen in the US.
Restaurant Chains and Fast Food establishments
Just as with street foods, the hygienic standards are usually set at the local level. However, the stakes are higher for chains. One error in the food supply could affect customers in more than one state.1 This can have significant negative results in company's reputation and finances. There are still people who talk about Jack in the Box's E. Coli outbreak in 1993 which almost bankrupted the company. That outbreak also resulted in even more regulation in the food industry.
Making the food 'clean' isn't a man hours question. It's largely automated and typically includes measures like irradiation and cooking at a certain temperature for a certain time. Both measure kill bacteria that lead to spoilage (increases shelf life) and illness (sick people). The automation is largely an upfront capital expenditure and is relatively inexpensive compared to people/manual labor.
Ameircan food makes you sick?
So, although the American food supply is at least as safe as any first world country, people who are not used to the richness of the food may experience discomfort. Additionally, the lack of bacteria or other things found in food you're used to eating may also upset your stomach.
That being said, trust your instinct. If you think it's under cooked or not clean, don't eat it or ask the seller to make it right. They want to make you a satisfied (repeat) customer.