You are confusing a dangling participle with a participle used in an absolute construction. In a far more frequent, non-absolute construction, a participial phrase wants to attach itself to the first semantically available element and stay there; in an absolute construction, it isn’t even looking. First, a look at how participles are supposed to function:
Turning the corner, he glanced back and saw that Mario was about thirty yards behind. Just around the corner was a shop selling cigarettes and tobacco. Stanislaw was exactly where Cam expected him to be, standing outside the shop, looking in the window. — Ken Follett, Edge of Eternity: Book Three of The Century Trilogy, 2014.
While Mario might have just turned a corner further away, the reader understands that he, not Mario, was the one doing the turning, just as the shop is doing the selling and Stanislaw is doing the standing and looking. Even though shop is adjacent to looking in the window, it is not semantically available because a shop is incapable of sight and if it were, it would still be difficult to look into its own window. The reader knows to parse looking in the window and standing outside the shop in parallel to describe Stanislaw’s location.
Danglers
Some published authors, however, are perfectly happy sending a participle on a vain search for that semantically available element:
Turning the corner, the black shawl wrapped around her neck while her rough hands stiffened on either side of her body, weighed down by two immense packages. — Samuel Rawet, The Prophet & Other Stories, 1998.
Turning the corner, the building came into view. The doorman was in his brown uniform, its brass buttons shining. — Richard H. Casebier, The Better Man, 2008.
Turning the corner, a massive stone house looks like it may have been a small church. — Danny Bernstein, The Mountains-to-Sea Trail Across North Carolina, 2013.
Black shawls, buildings, or massive stone houses can’t turn corners, yet grammatically, these writers have forced them to. Someone turned a corner wearing the shawl or to see the building or house, but that person is nowhere in the sentence. The first example is particularly obnoxious because after the initial participle fails to attach to scarf, readers are likely to parse wrapped as a participle as well, then, arriving at the end of the sentence, find no independent clause. Otherwise, you have a killer black shawl trying to strangle hapless women on the street. All because the initial participle floats in the air, unable to attach semantically to any noun in the sentence.
Absolutes
In an absolute construction, this floating in space is intended. It describes how, and sometimes when or why, the entire action or state in an independent clause occurs — without attaching to any specific element. A participle in an absolute construction always has a subject.
Earlier grammars termed this construction a nominative absolute, ‘nominative’ because of the required subject and because similar constructions in ancient languages were cast in different cases: Latin (ablative), Greek (genitive), and Sanskrit (locative). The term absolute comes directly from Latin absolūtum ‘loosened, separated from’.
The ThoughtCo. article on absolutes give numerous examples, five of which are cited here:
Roy circles the bases like a Mississippi steamboat, lights lit, flags fluttering, whistle banging, coming round the bend.— Bernard Malamud, The Natural, 1952.
The first three participles — lit, fluttering, banging — do not modify steamboat, but unfold the simile of the independent clause. They describe how Roy was circling the bases. The last participial phrase, however, which has no subject, does modify steamboat, effectively framing the other three phrases embedded within the simile like a Mississippi steamboat coming around the bend.
Harry froze, his cut finger slipping on the jagged edge of the mirror again. — J.K. Rowling, Harry Potter and the Deathly Hallows, 2007.
When Johnson Meechum came up the three steps of his purple double-wide trailer and opened the front door, his wife, Mabel, was waiting for him, her thin hands clenched on her hips, her tinted hair standing from her scalp in a tiny blue cloud. — Harry Crews, Celebration, 1998.
Still he came on, shoulders hunched, face twisted, wringing his hands, looking more like an old woman at a wake than an infantry combat soldier. — James Jones, The Thin Red Line, 1962.
Two middle-aged men with jogging disease lumber past me, their faces purple, their bellies slopping, their running shoes huge and costly. — Joe Bennett, Mustn't Grumble, 2006.
These examples describe a person as they perform a particular action, or in Harry Potter's case, as he does nothing at all. Had the authors of these sentences wished to use a more mundane construction, they could have inserted the preposition with before the participial phrases, but that would have a completely different effect.
Verbless
You may have noticed that in the last example, their faces purple has no verb. Linking verbs like be or become are often omitted in absolute constructions:
'Yes, my King,' Peritus said, his face now a blank, his thoughts hidden. — John Gwynne, Malice, 426, 2012.
The dance at an end, the goat resumes his place on the pedestal, and the ladies who have been looking on approach the Duchess with curtsies and reverences, and then take her away. — Henry Wysham Lanier, The Golden Book Magazine vol. 7-8 (1928), 202.
An hour later, the battle over, a freezing Scott and the last two dogs were hauled up. — Ranulph Fiennes, The Ranulph Fiennes Collection: Captain Scott, 2013.
The verb is explicit, however, in the most famous — and most controversial — nominative absolute in the English language: the Second Amendment to the United States Constitution:
A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.
The absolute construction here suggests a necessary and prior condition under which the action of the main clause is to take place, i.e., a ‘why’ if you will, but what this semantic relationship entails in this particular “floating” participial construction will continue to be debated.