For example, aleph and bet both begin the Hebrew alphabet and are essentially equal to A and B; Kaf, lamed, mem, nun is remarkably similar to K, L, M, N. As far as I know, the languages are not related. Why is this placement almost the same? Is it just random?
The languages are not related, but the writing systems are.
English uses a variation of the Latin alphabet, which--along with the Cyrillic alphabet and perhaps the Armenian and Georgian alphabets--descend from the Greek alphabet. The Greek alphabet, along with the Arabic, Hebrew, and Syriac abjads and the Ge'ez abugida, all descend from the Phonecian abjad. Some of this spread can be attributed to the use of Aramaic as a common language among the Achaemenid, Seleucid, and Parthian Empires, and throughout the Egypto-Mesopotamian classical world, as well as Phonecian, and later Greek, colonization of the Mediterranean.
Alphabets ideally represent each consonant and vowel found in a language with an individual letter. Abjads, on the other hand, ideally do not have letters which represent vowels, only consonants. Abugidas ideally represent a consonant, which is assumed to have an inherent vowel, and change what their inherent vowel is with the help of diacritic marks.
I say "ideally", as there are exceptions in each system. Arabic and Hebrew, for instance, use diacritic marks to represent vowels, especially in the context of the Qur'an and the Torah, where they are obligatory.
And it goes even deeper than mentioned above, as the Brahmic scripts (of South and Southeast Asia), like the Devanagari and Thai abugidas are likely also descended from the Phonecian abjad. Turning things on their head, some scripts of Central and Northeast Asia, like the Mongolian alphabet.
Many of these Brahmic scripts employ a very different system of collation. Rather than something like the Phonecian A-B-G-D-..., they use an ordering of K-S-T-N-... This system spread alongside Buddhism, and is even used in a few writing systems that are otherwise unrelated to these Egypto-Mesopotamian scripts, such as the Japanese syllabaries (descended from Chinese characters).
Ultimately, these writing systems may share a common origin with Egyptian hieroglyphs, though this is debated.