They were lovers, with Margarita being the major driving force in that love affair - I doubt the Master would have bothered if Margarita hadn't.
They share an element of obsession, Margarita with the Master and the Master with his novel.
Margarita is devoted to him perhaps out of a sense of low self-esteem - she lives through his success, not her own - perhaps out of a sense of desperation - anything would seem better than her loveless marriage. Or if you're feeling romantic out of pure love.