Actually rivets are superior in just about every way. They fill the entire void, are impossible to accidentally remove, and provide a larger cross section (are stronger). Bolts offer a sharp edge which will wear into the plate, have nuts that can come off accidentally due to bolt stretch or loading cycles (or improper torque like the Buckingham lanyard), and are smaller in cross section with less holding ability. You use stuff that's riveted everyday, and never think twice about it because it works so well (saw chain for example).
The reason bolts are so common with building stuff comes from ironworking. Back in the day everything was riveted, which required a certain number of people to do properly. If the crew didn't know what they were doing and didn't fully line up the plates, a weakened joint would occur, so you actually needed skilled workers that demanded good pay. Eventually metallurgical controls got to the point that a bolt could be cheaply made and would have a strength acceptable for using in this particular application. So they told everyone hey we got this newish thing that is better, so we're going to use it from now on. Bolts were undeniably weaker, but were easier to model using mathematical equations so engineers could determine the strength of the connections and would just oversize them to get the desired strength. It was easier to do in the field, so you no longer needed to pay top scale, because anyone can torque a bolt. They have advanced it now to where one guy is needed because the bolt has a smaller size spline at the end that a hydraulic torque wrench uses to keep the bolt from spinning, so you don't need a guy in the other side to hold back the bolt from spinning. They dumbed down the trade to achieve a lower labor cost, and that combined with the advances of cranes led to the decline of the ironworker profession.