I wonder how those minimum requirements are determined, especially RAM, CPU frequency in general? Is there a logic behind it or is it just determined by testing the program with different hardware to find out what would be okay for the end user?
Well, it is not possible to give a definite answer. (Different people, groups, companies are likely to have different ideas / approaches.)
But in general, the only way that is likely to work is empirical; i.e. try it and see.
Install the software on a variety of supported platforms and measure the disc space.
Run it1 on a range of systems with various CPU speeds and various amounts of memory:
- See whether it works acceptably well (subjective).
- Look at the system stats for signs of stress on lower-end systems.
Incorporate feedback from in-house users and external beta testers.
1 - Depending on the nature of the application, you may need to try with different sized problems, datasets, numbers of online users, whatever ... up to a point that is reasonable.
I have not come across a case where you could get reliable platform recommendations by simply applying some logic. At a minimum you need to run some tests to calibrate your "performance model".
Even when there is a correlation between problem size and performance, you usually cannot reliably predict when you are going to run into scaling-related performance problems ... until you hit the problems.