Aperture controls light.
It also controls how much of the scene appears acceptably sharp.
That second part is where things get interesting.
Depth of Field Is Not Just About f/2.8
Depth of field depends on aperture, focal length, subject distance and how the final image is viewed.
A wide aperture can create a very shallow area of focus.
A narrow aperture can give you more depth.
But changing focal length and moving closer or farther away also changes the result.
Background Blur Is Not the Same Thing
People often use "bokeh" and "depth of field" as if they mean the same thing.
They do not.
Depth of field describes the region that appears acceptably sharp.
Bokeh describes the visual character of out-of-focus areas.
A photograph can have shallow depth of field without particularly beautiful bokeh.
Choose Aperture for the Photograph
If I am photographing a person, I am not automatically choosing the widest aperture available.
If both eyes need to be sharp, extremely shallow depth of field can become a problem.
If I am photographing a landscape, I may need much more depth.
Aperture is a creative control, not just an exposure control.
What Actually Matters
Do not ask, "What aperture should I use?"
Ask, "What needs to be sharp?"
Then choose the aperture that supports that answer.