Pronounced with an initial alveolar nasal

Why do we spell the words knife and knight with a when they are pronounced with an initial alveolar nasal?