Set a large pot of heavily salted water on to boil. Meanwhile, put the olive oil and guanciale in a large, heavy saucepan over medium-low heat and cook until the guanciale starts to crisp and has rendered most of its fat, about 7 minutes.
Scoop off all but about a tablespoon of the fat and reserve it for another use. Add the onions and red pepper flakes to the pan, stirring through. Cook until the onion softens and starts to caramelize, about 5 minutes.
Add the garlic and cook for another minute. Add the tomatoes and butter and a couple generous pinches of salt and simmer the sauce over the lowest heat possible while you cook the bucatini.
Cook the pasta according to the package directions, until just al dente. Drain, reserving about a cup of the pasta water. Return the pasta to the pot over low heat and stir in about two thirds of the sauce. Add more sauce if you'd like, and a little pasta water if it seems dry. Serve the pasta immediately, with lots of Pecorino Romano grated over the top and more red pepper flakes on the side.