I had been wondering about this for a while. Consider the spelling of he names of Izanagi and Izanami in the 古事記:
伊邪那岐神【いざなぎのかみ】 and (妹【いも】)伊邪那美神【いざなみのかみ】
(source)
Both of their names use the kanji 邪, which, at least today, is associated with a negative connotation such as よこしま.
There are several theories regarding the meaning and origin of their names:
- 「誘【いざな】う」の語根 + ぎ・み(男性・女性を表す語)
- 功【いさを】の語根
- サンスクリットの「伊舎那天【いしゃなてん】」、「伊舎那后【いしゃなくう】」
But at any rate, the kanji would appear to be ateji used mainly for their phonetic value. Still, there are many possible kanji candidates and I would expect their semantics would at least e taken into consideration.
If we take a look at a list of man'yōgana, we find some with a rather negative connotation, eg. 恥【ぢ】 or 愚【ぐ】, albeit most of them do not strike as negative as 邪.
Moreover, Izanagi and Izanami are amongst the more important kami (I would think), and 射 seems to be the most common transcription of za in the Man'yōshū, compiled only about 50 years after the Kojiki, at a frequency of 85/99.
There is an answer at chiebukuro hypothesizing that this choice had been China's way of making fun of Japan and demonstrating their superiority. While this might be a possible explanation for the names 卑弥呼【ひみこ】 and 邪馬台国 (やまたいこく・やばたいこく・やまとこく), which appear in the 魏志倭人伝【ぎしわじんでん】 written in the late 3rd century in China; this seems to be an implausible explanation for the names in the 古事記 written in the early 8th century not in China but in Japan.
I looked up 邪 in a kanji dictionary and apparently, it originally referred to the place name 琅邪【ろうや】. However, we can find for example the following passage in the 古事記 proving that 邪 had already been associated with a negative meaning.
〔原文〕 爾速須佐之男命答白「僕者無邪心、唯大御神之命以、問賜僕之哭伊佐知流之事。故、白都良久三字以音、僕欲往妣國以哭。爾大御神詔、汝者不可在此國而、神夜良比夜良比賜。故、以爲請將罷往之狀、參上耳。無異心。」
〔文語訳〕 ここに速須佐の男の命答へ白したまはく、「僕(あ)は邪(きたな)き心無し。ただ大御神の命もちて、僕が哭きいさちる事を問ひたまひければ、白しつらく、僕は妣(はは)の國に往(い)なむとおもひて哭くとまをししかば、ここに大御神汝(みまし)はこの國にな住(とど)まりそと詔りたまひて、神逐(かむやら)ひ逐ひ賜ふ。かれ罷りなむとする状(さま)をまをさむとおもひて參ゐ上りつらくのみ。異(け)しき心無し」とまをしたまひき。
〔現代語訳〕 すると速須佐之男の命は、「私に邪悪な心はありません。伊邪那岐の大御神から泣き喚く理由を問われましたので、 『私は母の国に行きたいと思って泣いているのです』と申し上げました。 すると伊邪那岐の大御神は、『お前はこの葦原中国に住んではならない』と言って、私を追放されたので、 母の国に参ろうとする事情を申し上げようと思い、高天原に参上したのです。邪心などありません」と答えた。
Interestingly, the spelling was changed to 伊弉諾尊 and 伊弉冉尊 in the 日本書紀, 弉=>大きく堂々としている and 冉=>しなやかなさま), yet as illustrated above, the significance of 邪 must have been known.
Perhaps considering Izanami's fate does contribute some insight into this naming choice:
イザナミは火神を生んだために女陰を焼かれてこの世を去ったとなっている。この病臥中にイザナミの嘔吐や糞,尿から木,火,土,金,水(五行)の神が生じたとあるが,これらの神々は同時に焼畑農耕の発生を暗示しているともいえる。
[...]
最後には黄泉国【よみのくに】との境において対立し,男神は人間の生をつかさどる神として,女神は人間の死をつかさどる冥界の神として互いに絶縁する。
「世界第百科事典 第二版 平凡社」より
The question is thus: Are there any insights or explanations as to why 邪 was chosen to spell the names 伊邪那美神 and 伊邪那岐神? Or was it used merely for its sound?