A class of optimization problems which are formulated using solutions to boundary value problems of partial differential equations (PDEs) as equality constraints is called PDE-constrained optimization problems. Specifically, when the variable in the optimization problem is given by a function defined in the PDE, the problems are classified as PDE-constrained non-parametric optimization problems. The topology and shape optimization problems of density and domain variation type, respectively, are included in this category. This paper is written to convey the idea of the author who worked on this topic for over 30 year, unlike the usual review papers. After showing real images of the problems, the author's theoretical image is introduced. Based on the theoretical image, basic questions about the structure of the problems when viewed as a function optimization problem are proposed. The author's answers to these basic questions are presented in the next section. Based on the understanding, some numerical results in which anxious phenomena are observed are presented and their causes are discussed. The expectation of applying the basic theory to real-world problems is presented using examples. Applying the theory of shape optimization problem of domain variation type, a problem finding the optimum shape of a sole in sports shoes that maximizes the stability under keeping the ideal cushioning is introduced. Applying the theory of topology optimization problem of density variation type, a problem identifying the muscle activity in a tongue during swallowing is explained. From these examples, it is concluded that PDE-constrained non-parametric optimization problems can be effectively applied to real-world.