This absolutely wasn't a test, they were just offering you chocolate. That is a lovely gesture, I wish I had been offered chocolate in my interviews.
I'm not sure why anyone thinks it would be a test - it doesn't make any sense. The pregnancy angle is only possible because OP started asking about alcohol. In this way, the OP has (potentially) invited the assumption on their own - they could have just as easily been offered a sandwich, or water.
I'm a little surprised by the assumptions drawn in the OP - in many cultures everyone drinks, and it is astonishing to not drink. Where I am now, very few people are vegetarian, and people are nonplussed* when they hear I am one. It is conceivable that the question "why wouldn't you drink" was simply asked out of surprise, and not to determine pregnancy. Recall that you can eat chocolate when you're pregnant, so offering it is not a great test of any current/upcoming pregnancy.
On to your - honestly, a little mind boggling - assumptions
Now I believe they had that chocolate thing as a kind of test, and it didn't just happen to be a small act of kindness. But I can not figure out what kind of test.
It was just chocolate. Chocolate is not a test.
Where they trying to figure out if I may be pregnant? Where they trying to see if I fit company culture about normal alcohol use?
No. No they were not. If they wanted to see if you were pregnant, one assumes they could offer you a wine, or perhaps ask you your plans for the next 3 years. This would be a much simpler test, and the former also more fun to execute - nobody should drink alone.
Chocolate is not a test. Though conclusions can be drawn from a chocolate test, they are not solid conclusions.
If you want an example of how a reaction to an impossibly small detail can be used to draw nebulous conclusions - Your reaction to being offered chocolate tells me a great deal about you. I now know that you are always over-thinking things, that you don't ever accept that you can be wrong, and that you don't understand how to interact with people. You are also probably an alien from mars. Also, stop wearing crop-tops to interviews, it will only invite stares at your belly.
I have the feeling I reacted very immature, how could I have responded better?
I'm not sure how this question actually fits with the assumptions you draw immediately above it, but: Next time you're offered something instead of asking if it has meat or chocolate or alcohol or whatever, just say "no". Or, alternatively, just say "yes" and eat it. Please don't be That Person who makes a big deal of every gift/offer they get.
- This is the right use of nonplussed!