Because an integer was being passed where a TLObject was expected, so the serialization with bytes() was actually requesting that many bytes as opposed to properly converting the expected object.