The thing is that without a leading constraint you’re potentially allowing the stack view to overlap the label to the left and/or go off the left edge of the screen.
And the same kind of sizing/spacing issues can occur with a vertical stack view.
Further, a lot of the time you can’t simply leave off a constraint, especially if you’re using auto-sizing tableview cells, collection view cells, or scrollviews where you want the content size calculated automatically.
What you need is to add a trailing constraint that pins the stack view to the desired edge (as in your example) and then also add a leading constraint, pinning it to the left edge of the screen (or, perhaps, to the right edge of the label).
The trick to avoid opening the can of worms, however, is changing the leading stackview constraint from equal to the superview’s leading constraint to greater than or equal.
That will allow the left edge of the stack view to snap over to the intrinsic width of the contents of the stackview. Easy-peasy, and no worms in sight.
Vertical stack views are similar. Pin the top with equals, and pin the bottom with less than or equal.