The answer is, it depends!
The rule of thumb for most of bosses is that you need to be online and logged in order to receive part of the boss loot (for example, daily bosses and such). The Piñata Dragon is an exception of this rule, however.
I can't confirm if this is intended or not, but my perception is that the rewarding system for bosses works differently in some cases. It is a curious question to think about, without a comnplete answer as far as I know!