Often they were programmed in machine code. The BASIC listing was just a tiny loader and the actual program in hexdecimal strings. The loader decoded the strings, poked them into memory and then called the start address.
Nothing like typing in a 2 page program full of DATA statements and number values only to find out you made a mistake SOMEWHERE and they didn’t have any checksum routines.
I don’t know how many times I typed in that damn MAD magazine program and never got it to work. It took 30+ years to find out it had a error, would never run anyway and seeing someone else fix the bug and watching the program execute after all those years was finally closure.
Compute! Magazine for the Commodore 64 had a special input program that did checksums on their input listings, allowing you to type in long lists of numbers accurately and eventually end up with the excellent SpeedScript word processor, among other programs.
Actually the best games and software were programmed in assembler and you had to load them from cassette tapes.
You couldn't do much in Basic.