I don't have a laptop, so I can't tell you if that's normal or not -- I've seen Mac laptop fans come on when running DAWs, but not as in your situation. AFAIK anytime the Mac heats up to a certain degree-- for whatever reason -- the fan will come on, so perhaps when you open the lid the Mac wakes up and begins to run background OS tasks -- I guess if it was already warm, maybe that could heat it up further to the point where the fan is required, but, again, I don't know if that's the case, or if that would fall under normal operation or indicate a problem..? Quick searches of "macbook fan" and "macbook fan sleep" turned up a lot of discussion, but since this could be a hardware issue I wouldn't fool around with it, I'd contact Apple tech support directly. Here's a tech document from Apple regarding fan issues:
https://support.apple.com/en-us/HT202179
Note the item about making sure the vents are not blocked..