Why doesn't encode already return bytes?