Can I use generatetoaddress to set bitcoin core always in "mining mode"? just like "fGenerateBitcoins = 1" option
No, the "generate=1" option was
removed in 0.19 because of user-inscrutable development reasons around not wanting to have non-wallet code talking to wallet code. You could still trigger it with a script after startup if you wanted to be silly and run it.
Does it mean CPU mining still has change to win a block ? although it is less chance
And surprise to see one guy mine a block by CPU ~~~
A very very small chance, but mostly it will just be a waste of electricity. If you'd like to play the mining lottery, you can get an older asic miner inexpensively and solo mine with that--- your chances will still be low but not as insanely so.
With CPU mining your computer might use on the order of $0.5 in additional power per day, and make about 86 billion tries at mining a block each with a one in 66 sextillion chance of finding a block (actual figure)--- based on a quick measurement here. So that means each day would have a roughly one in 772 billion chance of finding a block.
With an older asic, like the aforementioned S3, you'd use an additional $.88 in power per day (assuming $0.1/kwh) instead of $0.5, but make 41 quadrillion tries instead of 86 billion. So your chances of success would be about a half million times better -- though still pretty low at about one in 1.6 million per day. -- but at that point the odds start looking like lotteries that people actually play.
Old miners like the S3 make for perfectly reasonable electric heaters, in places where you might otherwise use a resistive heater.
The figures are, of course, much better with newer more efficient mining hardware, which is why people can mine as a profitable business.