Often muscles get tight due to muscle inhibition. When a muscle is tight, the most obvious response is to try to stretch it.
However, when you stretch an inhibited muscle, it typically creates further inhibition.
If you stretch a muscle and it tightens up, there's a good chance you're dealing with inhibition.
The psoas major muscle, the hip flexor, is an example of a frequently inhibited muscle that gets routinely and mistakenly stretched.
Try activating it and stretching the opposing muscles (i.e. Hip extensors).