My understanding of the phrase 'do it well' isn't as an injunction but as a way of saying that if you restrict your program to one thing, you'll have the ability to do it very well. It's to contrast it to a program that does multiple things, not so well.
What I understand flexible to mean is "serving 99% of use case scenarios". Arguably Photoshop does this, Instagram does not. Or maybe a better analogy is Photoshop vs Photoshop Elements, which probably only servers 80% of use case scenarios. Or Chrome OS (80% of desktop use case scenarios) vs Windows (99.9%).
As I said, in this context, it means flexibility, but that flexibility must be tempered with composibility.
Think about how programs become bloated. What helps the core Unix command line tools avoid this fate?
"Do it well" is so vague of a saying that it really could mean any of those things, whether it be flexibility, or simplicity, or etc.