This is generally because there isn't enough moisture or it's overbaked, which is most mug cake recipes call for milk.