Funnily enough I was asked those two questions when I first posted about my ex.
I was baffled by them. Why on earth would I question why I was in a relationship? Getting from it? What a horrible selfish view of relationships!
A good few years on, I think these questions are vital. So many people coast along never ever asking them. But they are essential! Why?
Asking "why are you in the relationship" is a great one. If your answer is "Because I love him!" or "What? Why shouldn't I be?" that speaks volumes. No, you shouldn't be in a relationship just because it's a relationship. It should not be the default to stay, it should be the default to question - perhaps the opposite in a longer term relationship or marriage, but only if you've gone through the first period questioning. But many people don't. It has to be done. If you can answer this question immediately without really thinking too hard about it "Because he is inspiring, hard working, a good dad, kind, caring, etc" (or whatever, not suggesting that is the only right answer at all!) - then fine. If you can't, or it takes a long time to figure out, that's really not a good sign for the relationship.
Asking "What are you getting out of this" is not selfish. It's not about "what can I get from a relationship, screw the other person!", it's about a societal pattern that women tend to put a lot more into heterosexual relationships than men do. There are basic positives that a relationship should bring to both partners - emotional support, fun, happiness, boost in self esteem, a reduction in responsibility workload, sex. None of these should be missing without good reason.
Often people don't question either of these things which is why they are asked. They are also good gauges of the general health of the relationship. When someone is in an unhealthy relationship, it's difficult to think of things that are positive about it other than rather bland vague things like "the kids adore him" or "we've been together 10 years" or "I suppose he helps with the housework sometimes." And if you're feeling guilty "He brings in money, but I'm not with him for his money" that's a clear sign that either things aren't as equal as they should be or he's making you feel guilty about the basic things which are an expectation in a relationship (money not necessarily, but sharing the responsibility of running a household, which includes bringing in money, is an expectation in an adult relationship.)