Why is it not simply possible to give all characters that use the same glyph a single code?
Unicode encodes characters, not glyphs. By unifying an encoding based strictly on appearance, many common text processing tasks would become convoluted or impossible. For example, Latin B and Greek Beta (Β) look the same in most fonts, but lower-case to two different letters, Latin b and Greek beta (β), which have very distinct appearance.