A liquid foam is a dispersion of gas bubbles in a soapy liquid matrix. It is a yield-stress material, solid-like at low stresses and which can flow under sufficiently large external stresses (A. Kraynik, Ann. Rev. Fluid Mech., 1988). Liquid foams are used in a diverse array of applications for their large specific area, light weight, and insulating properties. Foams have a multi-scale structure: they are composed of millimetric bubbles separated by submicrormetric films whose surfaces are covered with monolayers of surfactant molecules. The stability and rheology of foams depend strongly on the type of surfactants used to generate them, and the link between micro and macro scales remains an active area of research. Here we investigate this link at the bubble scale by numerical simulations. We focus on the elementary topological rearrangements, called T1 events, in a two-dimensional arrangement of bubbles submitted to shear. We use a two-phase flow level-set method that has been adapted to include surfactant dynamics (Titta et al., Journal of Fluid Mechanics, 2018), to extend the parametric study performed by Titta et al. In particular, we examine how the adsorption depth, a measure of surfactant distribution between the bulk and surface, influences on energy dissipated in the flow. Our simulations show that the integrated rate of viscous dissipation of mechanical energy does not account for all the work done in the material during T1 events. We explain this observation in terms of a surface dissipation generated through Marangoni stresses and surfactant adsorption/desorption mechanisms occurring at the gas-liquid interfaces. We analyze our numerical results in the framework of a classical model for the viscoelasticity of surfactant laden interfaces (Lucassen et al., Chemical Engineering Science, 1972), discuss the analogy, and propose some ideas for further development.