For great results, finish cooking pasta in the sauce, adding a little pasta water.
In a large saucepan, heat oil and garlic over medium until fragrant. Add onion and cook, stirring occasionally, until onion is soft. Add bacon and red-pepper flakes; cook until bacon is crisp, about 8 minutes. Season with salt and pepper. Add tomatoes and bring to a boil. Reduce to a rapid simmer and cook until slightly thickened, 10 minutes. Season with salt and pepper. Serve with 3/4 pound cooked pasta topped with Pecorino Romano.