Generally, People are told that Whatever Prophets leave is Sadaqa. Let us see what Scholar of Ahlu Sunnah says


Hamza Mohammad Qasim says in his book, Manar ul Qari Sharah Mokhtasir Sahih ul Bukhari, 4/132-133,


 اشتملت هذه الأحاديث على ذكر الأشياء التي خلفها النبي – صلى الله عليه وسلم – وانتقل بعضها إلى خلفائه كالخاتم، أو إلى أصحابه كقدحه ونعليه، أو إلى زوجاته كالكساء المربع -عند عائشة- أو إلى آل بيته كسيفه الذي وهبه لعليّ ثم انتقل إلى عترته الطاهرة، والله أعلم

These narrations consists of things which were left by Holy Prophet (asws), and some of these were transferred to Caliphs like His Ring; or His companions like His Mug or Shoes; or His wives like Sheet, which Ayesha had; or His Ahlubait like the Sword which He gave to Ali (asws) and then was transfered to His Pure Progeny


So, He mentioned some Items which were not made Sadaqa, rather used by People. But what made me surprised is the fact that He said that the Sword was given to Imam Ali (asws), Rather the word is GIFTED, So how was it then left by Him?