Macbeth’s fear of being emasculated, and the ‘feminine’ traits he inherits at certain points in the play, means Shakespeare uses his character to explore femininity.
The extended metaphor of theatre is a meta (self-aware) technique by Shakespeare, suggesting that everything is playing a part rather than being their authentic selves, so that appearances don't match reality.