The o-rings were not rubber, they were silicone, which has much higher temperature resistance than rubber. There was not a single o-ring, there were two, so if one burned through the second one was supposed to hold. They were sealed upon assembly in the field with mineral paste and the joint between the two booster sections was secured with clevis pins.
The joint failed because at cold temperatures, the silicone o-ring material lost its resilience and took a set. Then, when the the booster was lit and is casing expanded, the o-rings retained their cold-compressed shapes and allowed hot gas from inside the casing to spurt out the resulting gap in the seal. The engineers who specified the o-ring material had no idea that launches in Florida could occur in sub-freezing temperatures and so did not test the joint for proper performance at those temperatures.
When they did learn that that particular launch WOULD occur at those temperatures, they did get concerned about possible o-ring joint failure and warned management, but management overruled them.
Why use a field-assembled joint in the first place? Because the Morton Thiokol factory was in Utah, the launch pad in Florida, and the boosters had to be transported by rail, which set a limit on the maximum length of a railcar to guarantee it could negotiate the turns in the track and fit through the tunnels on the way. So the booster had to be shipped in sections and assembled to full length in the field.
The known problem of partial o-ring burn-through- present on almost every previous shuttle launch- was ignored by management because 1) they believed that each successful shuttle launch could be interpreted as a halving of the estimated probability of failure for each subsequent future launch and 2) the data on burn-through was never plotted as a function of ambient temperature at launch until after the accident, at which time the design flaw became glaringly obvious.