Urban spatial perception critically influences human behavior and emotional reactions, emphasizing the necessity of aligning urban spaces with human needs for enhanced urban living. However, functionality-based categorization of urban architecture is prone to biases, stemming from disparities between objective mapping and subjective perception. These biases can result in urban planning and designs that fail to cater adequately to the needs and preferences of city residents, negatively impacting their quality of life and the city’s overall functionality. This research scrutinizes the perceptual biases and disparities in architectural function distribution within urban spaces, with a particular focus on Shanghai’s central urban district. The study employs machine learning to clarify these biases within urban spatial perception research, utilizing a tripartite methodology: objective mapping, subjective perception analysis, and perception deviation assessment. The study revealed significant discrepancies in the distribution centroids between commercial buildings and residential or public buildings. This result illuminates the spatial organization characteristics of urban architectural functions, serving as a valuable reference for urban planning and development. Furthermore, it uncovers the advantages and disadvantages of different data sources and techniques in interpreting urban spatial perception, paving the way for a more comprehensive understanding of the subject. Our findings underscore the need for urban planning strategies that align with human perceptual needs, thereby enhancing the quality of the urban environment and fostering a more habitable and sustainable urban space. The study’s implications suggest that a deeper understanding of perceptual needs can optimize architectural function distribution, enhancing the urban environment’s quality.