If I develop just the webpage or webapp (such as using React or Vue), how does "scaling" the webapp have to do with my job, unless if it is related to the back end? What should I learn or how should I learn more?
One other time I interviewed for a front end dev role and they asked me how to design the Google search server infrastructure.
It's called System Design part of the interview. They want to understand your knowledge about software architecture in general and how you can be part of decision making if any new project starts. So, generally they don't want you to go through intricate details of the system, instead they want you to outline the basic components of a Google search server in your case. They might be interested in testing your knowledge about scalability, load balancing and other design related concepts. As far as scaling the app is concerned, they want you to go through how you structure a web app. They want to know how you will manage service, state management, UI components, presentational components in your web app and how your decisions can improve and scale web app to a greater extent.