Concrete is a material that is very strong in compression (pushing), but quite weak in tension (pulling). Rebar is formed into the concrete to improve these properties, by taking the load in tension. As can be seen in the image of a standard beam cage, it is extremely important to get the minor details right. Although the rebar has ridges, a straight bar can be easily pulled under high stresses. Therefore, nearly all rebar is bent into a curve at the end, so that it hooks into the concrete, and uses the high compressive strength when pulled. All those ties are extremely important, and require skilled workers to complete.
You can see problems with rebar (and associated concrete strength) whenever you look at earthquake disaster images. Most of the time, damage is due to very little rebar being used (just a few straight bars poking out of the rubble), or the rebar is not properly tied in at beam-column intersections. The proper use of rebar (and good concrete) is important in order to save lives in earthquakes. The use of building codes, and proper inspection can assure this and reduce seismic risk.
Sometimes epoxy-coated rebar is for corrosion resistance in special circumstances, such as bridge decks in northern climates where they use deicing salts on the roads.