It is because of structure packing. Compiler would make the size of structure a multiple of 4 bytes. If you do not want this to happen and see size as 10 bytes in your case, use __attribute__((packed))
struct ID3v2_frame{
char id[4];
unsigned int size;
bool flags[2];
}__attribute__((packed));
Note that this might affect the performance of the program. See this SO question:
Can __attribute__((packed)) affect the performance of a program?