You don't want water-retaining soil sitting against the building because this causes damp problems.
Creating a porous soakaway like this will mean any water sinks to a lower level than would cause any harm to the building.
gardening.stackexchange.com/users/17117/David Liam Clayton
Perhaps I missed something in the other answers.
The one and only reason is because of SPLASHING.
Rain over the gutter, a hard sideways rain will splash mud/soil onto the siding.
Not good for siding as the mud tends to hold moisture too long and can cause rot as well as a dirty 'skirt' on your siding.
The gravel, drain rock, cobble or even the lava rock as pictured in the first picture however needs to be below the siding
at least 4" otherwise the rock becomes a moisture problem.
That first picture with the lava rock and the trap?
That lava rock is touching the siding.
The siding appears to be concrete.
Concrete foundations need to be coated with asphalt for protection.
Concrete is very much harmed by moisture.
The picture with the 4X6 holding in cobble?
If that rock is as close as I think it is to the siding, that will rot the siding if it is not at least 4" below the siding.
Before the cobble or gravel gets installed this is when landscape fabric is necessary.
Not to prevent weeds but to prevent the cobble sinking down into the soil and the soil replacing the cobble.
The following is off topic but hopefully helpful...
I wish I could find a more common mulch people could use instead of chunky bark.
This is not for weed suppression it is to unify a landscape by covering the soil with a regular texture.
Chunky doesn't work.
Fine works far better for aesthetics and for decomposition sometime in the near future.
The only mulch I will ever use in the landscape is human poo mixed with sawdust and completely decomposed professionally. Grins.
That 4"X6" (not pressure treated)? is a great condominium for insects and other animals; slugs, snails, earwigs, pillbugs...and many more.
Not at all necessary or even beneficial.
I lived and breathed construction in all forms for half a century.
The only reason
and it works well, for using cobble at the base of an outside wall, is for splash.
If this is your lawn here is the best way to fix those edges.
Also look up how to produce and maintain a cool season lawn crop!
On our site, not on Scott's or Ortho...
Use a hose or string, a center to make a set radius to change when changing point of radius to the outside of the lawn.
Keep radius curves consistent for each curve.
They can change radii every curve but not during each curve.
lawn edging the right way
gardening.stackexchange.com/users/3351/stormy
My guesses are that it just looks a lot neater and also prevents weeds from growing near the foundation.
If weeds and their roots are allowed to grow there you would have to be constantly digging them out, and roots are already hard enough to get out of the ground without having to dig near or under that area.
Another reason, I think, would be because it is a more permanent solution to weed prevention instead of mulching.
Mulching has to be (or should be) removed and/or replenished yearly to maintain an attractive appearance.
Lots more work to do that way.
Yet another reason may be to keep water draining away from the foundation.
And as you say, reduce the likelihood of pest/vermin infestation, since animals and insects have an easier access to the house through soil and grass.
Possibly a combination of all of the above(?)
gardening.stackexchange.com/users/22076/Miss Tinker'smom
Some jurisdictions require non combustible mulch i.e. gravel next to the structures.
Several buildings have had fires started from discarded smoking materials in combustible mulch.
gardening.stackexchange.com/users/25202/Jose Periut SR
It’s mainly so termites don't get in to your walls as they require moist ground cover to travel and mulch against your home would provide that to them.
gardening.stackexchange.com/users/32385/Ben
Where I live, I've noticed many buildings have a stone/gravel barrier between the building foundation and the lawn or flower bed. Why is this? Does it prevent insect or pest infiltration of the structure?
Why do many landscapers put gravel around the base of buildings?
gardening.stackexchange.com
<lawn><foundation>
gardening.stackexchange.com/questions/39575
gardening.stackexchange.com/users/22147/Megatron
It prevents rain splashing over the gutter. It also looks neater and prevents weeds from growing up along the building. It limits pest access like termites. A porous soakaway like this will mean any water sinks to a lower level than would cause any harm to the building and it also prevents splashing from the gutter. It looks a lot neater and prevents weeds from growing near the foundation. In addition it looks a lot neater and prevents weeds from growing near the foundation and reduces the likelihood of pest/vermin infestation. Finally, some jurisdictions require non combustible mulch i.e. gravel next to the structures.
A porous soakaway like this will mean any water sinks to a lower level than would cause any harm to the building. To prevent splashing from the gutter. It looks a lot neater and prevents weeds from growing near the foundation. It reduces the likelihood of pest/vermin infestation. Some jurisdictions require non combustible mulch i.e. gravel next to the structures.