Either it's bugged or it contains elves that can process beans when the castle is sleeping.
If you have no beans in storage and then add them from your star menu, the castle immediately processes 25 beans and makes 5 stalks even if it is sleeping. Very annoying.
If you want to trade beans AND maximise stalk production with 4x buffs, you must have a buff active on your castle before accepting trades. I don't know if this is unique to the castle, but with such high value resources involved it's the first time I've noticed it (or cared that much)
Support reimbursed me my beans once, but I don't think they believed the bug was there.
They also said they had never heard of it before, but I know others in my guild have noticed the same and sent bug reports too.