Why does the VIC-20 have 5 KiB of RAM? Why not a multiple of 4 as any other systems, e.g 4 KiB or 8 KiB. Is there a technical reason for that?
Commodore had an overstock of 2114 Chips at that time (*1), so Jack Tramiel, then president of Commodore, ordered the project (*2) to use them.
Yeah, but why 5 KiB? Why not just 4KiB?
Due the nature of the 6502, RAM is needed at address 0, while the way the 6560 VIC (*3) was addressed called for RAM at $1xxx. So a contiguous memory of 4 Kib would not have worked. As a result they decided to add 1 KiB (2x2114) at address 0, so the CPU got its special areas (ZP/Stack), plus 4 KiB (8x2114) at $1000, thus having maximum flexibility with the video chip (*4).
Later, when the overstock was used up and the VIC-20 still sold well, Commodore made the B revision using two 6116 2KiB RAMs (*5) instead of the eight 2114s: by now, buying two larger was significantly less expensive than continuing with 2114s.
And as a side note, the VC-20 didn't just have 5 KiB, but an additional 1 Ki Nibble (4 bit words) as Colour RAM at $9400 (or $9600 in maximum RAM mode).
*1 - Commodore/MOS did produce RAMs at that time, but reacted way too late when the market shifted away from these small sizes and away from static RAM generally.
*2 - Which was already being rushed to completion, due to his need for a Spring 1980 CES presentation.
*3 - 6560 VIC - Video Interface Controller, the video controller used - hence the name for the machine. European Versions used the PAL Version 6561.
*4 - The whole story here is tied to the unusual way the RAM expansion for different sizes is handled.
*5 - It still had to be static RAM, as they just wanted to make a new board, not redesign the whole system.
The VIC-20 has 1K of low memory ram containing room for the zeropage, the stack and kernal and basic working areas. ($000-$03FF)
4K of main RAM ($1000-$1FFF)
so the main ram is a multiple of 4.