Apple briefly became the first publicly traded company to reach a staggering $5 trillion market valuation, cementing its place at the top of Wall Street.