Different pauses in this sentence have different meanings.
stay in rainy days, but stay in days. It means that the host doesn't keep guests, and the guests have to go.
if it rains, do you want to stay for days? Stay! The host keeps the guests, and the guests don't have to go.
This sentence originated from a story: Xu Wei (Xu Wenchang), a famous painter in the late Ming Dynasty. It is said that Xu Wei ran to relatives and friends' homes when he was poor and didn't have rice to cook, and lived on his own. Once, it happened that the spring rain continued, and the family he sent food to was very bored. One day, when the host saw Xu Wei go to the toilet, he wrote a line on the wall and politely ordered him to leave. That line reads:
"Stay here in rainy days, and stay here tomorrow"
When Xu Wei came back, he naturally understood this line, but he not only didn't leave, but also smiled and said, "Since you are so kind to keep me, I will stay again!" As he spoke, he raised his pen and circled this line:
"If it rains, stay for a day. Will you leave me? Stay! Hua Fu Gao Huang Yi cut the copper and expanded it. "