Why doesn't friction accelerate a ball undergoing rolling?

First let us clear up some definitions of the terms "reaction force", "normal force", and "frictional force".

Whenever there is a contact between two bodies, there is a reaction force on each body at every point of contact. A reaction force can be split into a normal component (sometimes called the "normal contact force"), and a tangential component (sometimes called the "force due to friction"). The direction of the force due to friction⁠ - the tangential component⁠ - is such that it opposes relative motion due to sliding / slipping.

This means that a perfectly rigid cylinder can roll on a perfectly rigid and rough surface forever since there is no sliding so no friction to provide a torque.

So why do balls we observe normally slow down?

The answer lies in something called "rolling resistance" (sometimes confusingly referred to as "rolling friction", or just "friction"), and entirely explains why a football comes to a stop after rolling it along the ground.

The key is that footballs and dirt are both compressible - they are not rigid bodies. On contact, the weight of the ball deforms both it and the dirt. This means that there are many points of contact between the ball and the dirt. Due to our definition, there are now many normal forces - to be precise, one per point of contact. We will ignore the tangential frictional components for now.

The deformation of the ball and the surface means that the line of action of these normal components is not through the center of the ball (see diagram).

normal forces after

As a result, the ball experiences two torques: a counter-clockwise one from the normal components to the right of the centerline, and a clockwise torque from the normal components to the left.

Since the normal forces are larger on the right side, the counter-clockwise torques are greater, and thus there is a net counter-clockwise torque and the ball slows to a stop.

Notice how we did not even consider any tangential frictional components at all. Just due to the normal components the ball is slowed.

There are a couple of points I have not covered, such as what role the frictional components do actually play and what happens in different types of deformations (e.g. the surface doesn't deform). Also you may be wondering why the normal forces on the right are greater. The answer to all these can be found at: https://lockhaven.edu/~dsimanek/scenario/rolling.htm . This is also where my diagram came from and I credit for these explanations. The exact diagram from your question is also used here and cited as a "naive pictures of friction and a rolling cylinder."

Rolling resistance, a.k.a., rolling friction, is basically the result of inelastic compression and decompression of the materials at the contacting surfaces (wheel and/or surface upon which it rolls). The inelastic behavior results in friction internal to the materials and a loss of energy dissipated as heat, known as hysteresis.

See the picture of a tire below.

The leading edge of the contact surface materials between the center point of contact and the starting point of contact compress. The resultant reaction force acts backwards on the wheel as shown.

When the materials separate at the rear side they decompress. The reaction force acts forward on the wheel as shown.

The squeezing and un-squeezing of the materials is not purely elastic and therefore internal friction dissipates energy in the form of heat. This loss of available energy for rolling due to heating is called hysteresis. As a result the reaction force acting forwards during un-squeezing is less than the reaction force acting backwards during squeezing eventually bringing the wheel to a stop.

Hope this helps. enter image description here

Suppose nothing slows the sphere. It rolls forever. In that case, it would roll the same on ice. The friction in your diagram would be $0$.

Suppose it rolls on a rough surface and something (wind resistance? ) slows it. That is, a force on the center of mass acts in the backward direction. Friction of the surface would keep the sphere from slipping. That is, friction would act in the forward direction. Those two forces form the torque that slows the rotation.