What purpose is 的 serving in 姐姐给我买的衬衫?
See my answer to this post Why no 的 in this sentence?


  的 1.(adjective suffix): 
  
  的 2.(possessive):


"的" in  [姐姐给我买] [的] [衬衫] is an "adjective suffix"

"姐姐给我买的" (the one that my sister bought me) is an adjectival phrase that describes the noun "衬衫"

What shirt? The shirt that my sister bought for me


  Using the adjective suffix 的 can turn a very short phrase or a long sentence into an adjectival phrase


Example:

失敗 (fail)--> 失敗的人 (failed person/ the person who failed )

沒有工作，整天玩電腦遊戲 (have no job and play computer games all day) --> 沒有工作，整天玩電腦遊戲的人 (the person who has no job and plays computer games all day)