That is because the account does not have enough lamports. Solana requires fee for storing data as they need to be managed by the clusters. If the account has enough lamports to pay for the data at least 2 years, the account become rent exempt. Currently solana does not allow newly created accounts to be rent payer, meaning that your account should have enough lamports to become a rent exempt. Furthurmore, if your account was rent exempt and you resized data or used some lamports so that your account can not be rent exempt anymore, transaction will be failed because it does not allow rent exempt accounts to be rent payer. If your account was originally rent payer and you try to resize data but don't have enough lamports to be a rent exempt, transaction will also fail.