Walking up to bear cubs with momma near by is not an unprovocative act. It is an attempt earn a Darwin Award. Bears will defend their cubs from any perceived threat. But, and conceding odd exceptions, most bears do not attack humans w/o provocation of some kind.
Unfortunately, both the definition of said provocation and the terms of the response are left to only the bear.
JMHO, casually walking up to any animal with young is a chancy prospect and the further up the food chain, the greater the potential for harm.
I suppose that, along with a distaste for the company of idiots (which may be interchangeable with tourists and/or wildlife photographers) is the reason why I've not been to Yellowstone in spite of living within sight of the place.
I've got quite enough wildlife around The Homestead already thank you very much.