If a match is held between AC Milan and Real Madrid, then Real Madrid will field players from the bench to show their strength, while AC Milan will consider Real Madrid as a big opponent and enter the field with their strong XI. Hence, such matches usually see relatively weaker teams winning against stronger opponents.
However, AC Milan's win over Real Madrid certainly gave them a boost of confidence that will come in handy when they start playing in the main stage. Seeing Real Madrid performing poorly in the pre-season matches, there is no reason to think that this team might not be able to do well next season. Be patient and wait for the season to start, surely Real Madrid's performance will make you happy.
Even I agreed with your statement partially but still I have strong feeling we can't consider AC Milan as weaker side because they are also having good history even not like Real Madrid, but they are one of the best European product with many milestones and quality performance recently they are doing good job just because of this we are having good performance from them in pre-season games because they are feeling next season is going to be challenging in Serie A.
Game between Real Madrid vs AC Milan were having just for the fun, and usually we all know these games are never been having any worth but still they are checking their new players and also having some test case for their preparation which are they doing for the next season because we are having too many teams are ready for the top tier fight into this coming season, and they are looking for perfect results.