When Korea was ruled as an oppressed colony by Japan between 1910-1945, many Korean intellectuals and scholars were sent to political prison camps by the Japanese authorities. Whilst in prison, some of the political prisoners went on hunger strike and in any case other criminal prisoners often did not get even a basic food allowance.
So prisoners were famished upon their release and their poor metabolism meant that there was a severe danger of death through overindulging in eating causing intestinal problems and choking and many died.
People understood that tofu was the best food in this case because it provided protein and soft tofu could suppress the released prisoners’ ravenous appetites and left them feeling satisfied. Most of all, it was made in most homes everywhere in Korea at that time. Additionally, tofu is white and white means purity, cleanliness and innocence. So a person coming out from a prison might consider living a purer life so that they do not return.
So even though prison food is very nutritious nowadays, this tradition continues.